ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   macros (https://www.excelbanter.com/excel-programming/398892-macros.html)

chris123

macros
 
I have created a button to hide and unhide certain cells in a worksheet
however when i protect the worksheet my macros stop working and basically
wont let me use my buttons-the hidden parts become highlighted aswel. I am
also making it so only specific people can only edit specific parts of the
sheet and due to my macros messing things up they are not working. i really
don't know what to do any suggestions?

Zone[_3_]

macros
 
Unprotect the worksheet in the macro, like so:

Sub MyMacro()
Activesheet.unprotect password:="mypassword"
'your code here
Activesheet.protect password:="mypassword"
End Sub

HTH, James

"chris123" wrote in message
...
I have created a button to hide and unhide certain cells in a worksheet
however when i protect the worksheet my macros stop working and basically
wont let me use my buttons-the hidden parts become highlighted aswel. I am
also making it so only specific people can only edit specific parts of the
sheet and due to my macros messing things up they are not working. i
really
don't know what to do any suggestions?





All times are GMT +1. The time now is 01:14 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com