Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

I need and addin...

0 views
Skip to first unread message

Steve Barnett

unread,
Apr 3, 2002, 12:41:17 PM4/3/02
to
Does anyone know of an addin that can

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

unread,
Apr 3, 2002, 11:24:18 PM4/3/02
to
Sounds like a stand alone utility would be the ticket.... sounds like it
wouldn't be too bad to write either.. so, if you're still asking this
weekend, I could probably help put one together.

--
Ken Halter
MS-MVP-VB
Please keep it in the groups..
"Steve Barnett" <non...@nodomain.com> wrote in message
news:OuFsUaz2BHA.2648@tkmsftngp03...

Steve Barnett

unread,
Apr 4, 2002, 2:58:26 AM4/4/02
to
I didn't want to put anyone to any trouble. I was hoping there might be a
"cleanup your code for vb.net" type utility that could do this for me. I
appreciate the offer though.
Steve


"Ken Halter" <Ken_Halter@Use_Sparingly_Hotmail.com> wrote in message
news:OkFMWB52BHA.1372@tkmsftngp02...

Carlos J. Quintero

unread,
Apr 4, 2002, 6:19:56 AM4/4/02
to
Hi Steve,

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...

Steve Barnett

unread,
Apr 4, 2002, 6:30:56 AM4/4/02
to
Innovative as usual. I knew you'd have a way of doing this!

Thanks
Steve

"Carlos J. Quintero" <carlos_j_quinter...@hotmail.com> wrote
in message news:OzZdCq82BHA.872@tkmsftngp02...

Carlos J. Quintero

unread,
Apr 4, 2002, 6:49:55 AM4/4/02
to

If I remember well that "feature" was present in version 2.0 but was
undocumented and you had to use "\n\r" or something like that in the
single-line replace TextBox. I have coded other features that finally I did
not include in the version 3 such an autocompletion of statements, very
cool. I miss it a lot when switching back from VS.Net.

--
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...

0 new messages