Posted By: SEP2007 | Jan 23rd, 2007 @ 11:36 AM
page 1 of 1
Comments: 5 | Views: 2039
SEP2007
SEP2007
"Give Everything Its Home"
It is possible for me to write in some code so when I write a procedure in VB Xpress, I tapplies different formatting rules ?

So if I write :

Private Sub proc1()
    for n  = 1 to 5
       label.text = ...
       ....
       ....
End Sub

The editior will format this as.

*********************
*  Private Sub proc1()     *
*     for n  = 1 to 5          *
*        label.text = ...       *
*        ....                         *
*        ....                         *
*  End Sub                      *
*********************


??????

Why would you want to do that?

Code formatted like that will not execute.

I don't think the Express versions will do that.  You need something with a macro language to format code like that.

You could do something like that in Express with search and replace using regular expressions.  Try this:

Hi-light the lines you wish to comment out.
Press CTRL-H
In Find What type ^
In Replace With type '*****
Click the find options
Click Use Regular Expressions
Click Replace All

You can do something similar for the end of line by searching for $ and replacing with \t\t*****

The \t indicates a tab.

You will then have to fix the tab spacing on the end of lines manually.

If this doesn't work for you, then you might try some editor with a good macro language like UltraEdit  http://www.ultraedit.com/
page 1 of 1
Comments: 5 | Views: 2039
Microsoft Communities