code to disable "this cell contains a formula is not locked" warni

G

Guest

Hi, I have some code that copies formulas into various columns, and in one
column I fill it with formulas so as to give default values, but the column
is unlocked so the user can change as necessary, thus overwriting the formula
with a value - that's fine.

But I don't want the persistent green warning triangle in the upper left of
each cell to show. I tried to record a macro while disabling it, but it
doesn't record any code for that sequence.

Can someone help with with some VBA code that will disable the warning for
each cell in that column. I know that under Tools, Options, I can uncheck
that, but that's not the way I want to go because there are many others that
this will be distributed to.

Many thanks in advance for your help.
Harold
 
G

Guest

Under application, look at ErrorCheckingOptions Object

Application.ErrorCheckingOptions.InconsistentFormula =False

another property example:
Application.ErrorCheckingOptions.NumberAsText = False
 
G

Guest

Thanks Tom, it was:
Application.ErrorCheckingOptions.UnlockedFormulaCells = False
that did the trick for me.

Thanks for pointing me in that direction!

Harold
 

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

Top