how do I protect a worksheet and still use a checkbox control

G

Guest

My checkbox function works like this:

When checked, it unhides certain cells, when unchecked, it hides the same
said cells. When I use the protect worksheet function and I click on the
check-box, I get a message saying “The cell or chart you are trying to change
is protected and therefore read-onlyâ€. How can I use the protect worksheet
function and get the check-box function to work?
 
C

Casey

Jay,
You need an Unprotect / Protect routine in your checkbox procedure.
Something like:

Private Sub CheckBox1_Click()
ActiveSheet.Unprotect ("password")

"YOUR CODE HERE"

ActiveSheet.Protect ("password")
End Sub

HTH
 
S

sneakyzeal

Hi.. I need to do this exact same thing (protect a sheet but still hav
3 option buttons functioning, which change certain cells in th
worksheet). I've tried the code you suggested but it doesn't seem t
work properly. Also, I don't need to password protect.

Any other ideas
 
C

Casey

SneakyZeal,
Post the code for your option buttons and I will try to help. I'm
really buried today so it may be towards mid afternoon before I can get
back to you.
 
S

sneakyzeal

Hi Casey, I only just saw your reply. I managed to work it out all by
myself! But thanks anyway :)

Sneaky
 

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