Automate the Excel VB Editor Find and Replace

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Is it possible to write vba code that executes the Excel VB Editor Find and Replace function? If so how?
 
There is no way to automate the full find and replace
functionality in the VBE. It doesn't support a Replace method.
The CodeModule object does support a Find method, so you could
use this to search for the desired text, use the Lines method to
get the text, modify the text as required, use DeleteLines to
delete the existing line and finally InsertLines to insert the
modified text in to the CodeModule.


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com



jtedge said:
Is it possible to write vba code that executes the Excel VB
Editor Find and Replace function? If so how?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top