a) Split compound lines... I have several hundred instances of code like:
Dim sRoutine as string: sRoutine = "My_Routine_Name"
b) Split single line IF statements... I have several like:
If bDebug then WriteDebugFile "some text"
c) Modify function and sub statements to include the stuff that used to be
optional, back in the VB3 days, so can add "Public" to the function/sub
scope if there isn't one already specified and change the parameters that do
not already have ByRef to include it.
I have a load of legacy code that I've changing a bit at a time and it's
beginning to irritate me. I have MZTools but that does not do it... (It does
just about everything else though). It's not a major priority to change, but
it would be useful to make the code more explicit.
Thanks
Steve
--
Ken Halter
MS-MVP-VB
Please keep it in the groups..
"Steve Barnett" <non...@nodomain.com> wrote in message
news:OuFsUaz2BHA.2648@tkmsftngp03...
"Ken Halter" <Ken_Halter@Use_Sparingly_Hotmail.com> wrote in message
news:OkFMWB52BHA.1372@tkmsftngp02...
There was a little feature hidden in my add-in that I finally exposed in the
user interface and it is the possibility to replace a line of code with
multiple lines of code. The button "..." on the search results allow you to
enter a multiline text.
So, you could do the following:
Search all occurrences of "As String: " and replace them by "As String" +
(Carriage Return) + (Some spaces for indentation).
Or better search ": " and replace them by (Carriage Return) + (Some spaces
for indentation). You can review each result found before replacing all.
Certainly it will be there problems with the indentation but there are
indenters add-ins out there.
For point c, I suppose that you can do a two pass replacements "Sub " ->
"Public Sub " and then "Public Public" -> "Public" and so on.
--
Best regards,
Carlos J. Quintero
MZ-Tools 3.0 freeware 'all-in-one' Add-In for VB6 and VBA: Code Templates,
Detect dead code, Favorite Procedures, Favorite Projects, External
Utilities, XML Documentation, Private Clipboards, Select Case Assistant,
Sort Procedures, Collapse Projects, Split/Combine Lines, Open Folder of
File, Edit File As Text, MsgBox Assistant, Connect String Assistant and many
more features:
www.mztools.com
"Steve Barnett" <non...@nodomain.com> wrote in message
news:OuFsUaz2BHA.2648@tkmsftngp03...
Thanks
Steve
"Carlos J. Quintero" <carlos_j_quinter...@hotmail.com> wrote
in message news:OzZdCq82BHA.872@tkmsftngp02...
--
Best regards,
Carlos J. Quintero
MZ-Tools 3.0 freeware 'all-in-one' Add-In for VB6 and VBA: Code Templates,
Detect dead code, Favorite Procedures, Favorite Projects, External
Utilities, XML Documentation, Private Clipboards, Select Case Assistant,
Sort Procedures, Collapse Projects, Split/Combine Lines, Open Folder of
File, Edit File As Text, MsgBox Assistant, Connect String Assistant and many
more features:
www.mztools.com
"Steve Barnett" <non...@nodomain.com> wrote in message
news:#hFmBw82BHA.568@tkmsftngp07...