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

  • Thread starter Thread starter Guest
  • Start date Start date
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
 
Under application, look at ErrorCheckingOptions Object

Application.ErrorCheckingOptions.InconsistentFormula =False

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

Thanks for pointing me in that direction!

Harold
 
Back
Top