Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
JayS
 
Posts: n/a
Default how do I protect a worksheet and still use a checkbox control

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?

  #2   Report Post  
Casey
 
Posts: n/a
Default


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


--
Casey


------------------------------------------------------------------------
Casey's Profile: http://www.excelforum.com/member.php...fo&userid=4545
View this thread: http://www.excelforum.com/showthread...hreadid=397242

  #3   Report Post  
sneakyzeal
 
Posts: n/a
Default


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

Any other ideas?


--
sneakyzeal
------------------------------------------------------------------------
sneakyzeal's Profile: http://www.excelforum.com/member.php...o&userid=26978
View this thread: http://www.excelforum.com/showthread...hreadid=397242

  #4   Report Post  
Casey
 
Posts: n/a
Default


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.


--
Casey


------------------------------------------------------------------------
Casey's Profile: http://www.excelforum.com/member.php...fo&userid=4545
View this thread: http://www.excelforum.com/showthread...hreadid=397242

  #5   Report Post  
sneakyzeal
 
Posts: n/a
Default


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

Sneaky


--
sneakyzeal
------------------------------------------------------------------------
sneakyzeal's Profile: http://www.excelforum.com/member.php...o&userid=26978
View this thread: http://www.excelforum.com/showthread...hreadid=397242

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 09:08 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"