macros

G

Guest

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?
 
Z

Zone

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
 

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