VBE Find and replace with pattern

  • Thread starter Thread starter RB Smissaert
  • Start date Start date
R

RB Smissaert

Is it possible to do a find and replace in the Excel VBE with a pattern
specified?
For example I would like to replace:
If bConditionA = True with:
If bCondition
I can do a find with pattern like this:
If * = True
But replace like this doesn't seem possible.
Thanks for any advice.

RBS
 
Hi,

I'm assuming you know how to get each line of the VBE code.

Get Harlan Grove's SUBST() function ==> look into the Google archives and
recuperate the latest version.

Then for each line,

newText = SUBST(oldLine,"(.*) = True","$1")

Regards,

Daniel M.
 
Thanks, will give that a try.

RBS

Daniel.M said:
Hi,

I'm assuming you know how to get each line of the VBE code.

Get Harlan Grove's SUBST() function ==> look into the Google archives and
recuperate the latest version.

Then for each line,

newText = SUBST(oldLine,"(.*) = True","$1")

Regards,

Daniel M.
 

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