Instead of using "Clear"?

  • Thread starter Thread starter Michael
  • Start date Start date
M

Michael

Hi everyone,

In a VBA piece of code, I have this:

rngA.Clear

where rngA represents # of cells. When I tried to use "Conditional
Formatting" to color some cells if its value hit a target, then re-run
the model, this formating condition vanish! I think "rngA.Clear" is
causing this!!

What should I use instead of rngA.Clear, so the formatting condition
is preserved everytime the model is run?

Thanks,
Mike
 
Michael,

Depending on your needs, ClearContents might suffice. You could
also use rngA.Value = ""


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

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