Instead of using "Clear"?

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
 
C

Chip Pearson

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
 
Top