I’m a full time Excel developer.
That means I spend quite some time writing code in the Visual Basic Editor (VBE).
I don’t maintain a real code library, but I do copy lots of code from previous projects into new ones.
Whereas the VBE is quite a nice application to write code in, it does lack some functionality I needed a couple of weeks ago: the ability to do a search and replace operation on multiple lines of code in one go.
For example, many routines in my projects contain an error handling mechanism of some sort. These may contain something like this:
Resume
Else
Resume Next
End If
Now what if I want that to look like this:
Case vbRetry
Resume
Case vbIgnore
Resume Next
Case vbAbort
Resume TidyUp
End Select
I wanted a tool that would let me replace a number of consecutive lines of VBA code with another set of consecutive lines.
Well, here is my first go at it:
Excel VBE Multiline Search And Replace
And here is a screenshot:
Tell me what you think of it!
Regards,
Jan Karel Pieterse
www.jkp-ads.com