Sheet Protection

  • Thread starter Thread starter OdAwG
  • Start date Start date
O

OdAwG

Hello All,

I ws wondering on how I can protect a sheet that has nothing but formula's
in it. My Scenario is this:

I have a main sheet that I enter in all of my data into. from the other
sheets, I use vlookup and other formula's to pull data into them. The
problem that I am having is when I protect the whole sheet, then those cells
that I have formulas in them won't update when I run my upate macro because
they are protected. I don't want to un-protect those cells because, then a
user may accidentally del, change, or erase that formua.

Thanks in advance for any help

Argus
 
Hi

In this case, you could unprotect it before the update and protect it again
afterward.

ActiveWorkbook.ActiveSheet.Protect
<call the update subroutine>
ActiveWorkbook.ActiveSheet.Unprotect

hope this help.

Leung
 
I think you have a different problem.

If your code tries to change a locked cell on a protected sheet, it would fail.
But if your locked cells on that protected sheet are formulas and they're not
reevaluating, it's not the cause of the macro.

Maybe you've changed calculation to manual in your code to speed things up??????


ps. You can protect a worksheet in code that allows your code to make changes
to those locked cells on that protected worksheet--but prevents the user from
doing so. But this won't help in this case.
 

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