[vba] cannot hide/unhide rows when sheet is protected

jpbonono

Board Regular
Joined
Aug 18, 2013
Messages
154
Hi,

I have this code in my module

Code:
Private Sub Boys_Click()If Boys.Value = True Then
Rows("13:57").EntireRow.Hidden = True
Else
 Rows("13:57").EntireRow.Hidden = False
  End If
End Sub

However, my problem is whenever i protect the sheet it doesnt allow me to proceed(debug mode) since i am fully aware that some cells on the rows are protected to.

(I already tried modified the default cell locking(allowing rows) and still wont work)

Are there any work arounds here that would let excel allow the hiding/unhiding feature?

Thank you in advance.
 
But that does take a deliberate action rather than being accidental which is in certain circumstances is a reason for protecting a worksheet without a password a bit like a "are you sure you want to do this" button (I won't go into whether it is worth password protecting a sheet).
True, you make a very valid point, and from the standpoint of adding in another layer of required interaction before formulas can be tampered with this is worthy in and of itself.

Technically speaking however, it wouldn't prevent idle hands with curious minds from tinkering, and based on the level of concern that jpbonono has shown in his previous posts for keeping his formulas safe / private, a password does seem the logical course of action.
 
Upvote 0

Excel Facts

Links? Where??
If Excel says you have links but you can't find them, go to Formulas, Name Manager. Look for old links to dead workbooks & delete.
based on the level of concern that jpbonono has shown in his previous posts for keeping his formulas safe / private, a password does seem the logical course of action.

Except that password protection in Excel is so weak that someone with only moderate knowledge can easily bypass it (darn it, I stated I won't go into whether it is worth password protecting a sheet yet still did :) )
 
Upvote 0

Forum statistics

Threads
1,214,943
Messages
6,122,369
Members
449,080
Latest member
Armadillos

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top