#1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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?
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 373
Default 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?



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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Macros in Personal.xls that would create two toolbars and buttonswith assigned macros Brian Day Excel Programming 1 March 29th 07 11:20 PM
choose default macros Not Enabled / Macros Enable Setting BEEJAY Excel Programming 2 June 30th 06 01:07 PM
weird saving of a document with macros resulting with macros being transfered to the copy alfonso gonzales Excel Programming 0 December 12th 04 09:19 PM
convert lotus 123w macros to excel macros rpiescik Excel Programming 1 September 18th 04 01:35 PM
Macros not appearing in the Tools Macro Macros list hglamy[_2_] Excel Programming 5 October 24th 03 09:10 AM


All times are GMT +1. The time now is 09:37 AM.

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"