Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default How can I make macros execute on a protected sheet?

I have several command buttons attached to macros to enlarge or reduce the
size of embedded charts. When I protect the sheet, the macros will not
execute. Is there a way to protect the sheet and still enable the macros?
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 30
Default How can I make macros execute on a protected sheet?

In your macro you could just add a line of code at the begining to
unprotect the sheet and then at the end of the code you can protect the
sheet again.

activesheet.unprotect
- macro code
activesheet.protect

if you have the sheet passwork protected you will need to add the
password at the end

activesheet.unprotect "password"

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 34
Default How can I make macros execute on a protected sheet?

ActiveSheet.Unprotect Password:="XXX"

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
run macros on protected sheet widman Excel Discussion (Misc queries) 4 December 10th 06 10:09 AM
protecting macros for a protected sheet Jon Excel Discussion (Misc queries) 3 March 29th 06 03:32 PM
Enabling macros while the sheet being protected ! dinesh Excel Discussion (Misc queries) 13 September 27th 05 08:47 PM
is it possible to use macros when the sheet is protected Dajana Excel Discussion (Misc queries) 1 September 23rd 05 03:08 AM
run macros on a protected sheet? Joe Z[_3_] Excel Programming 10 February 5th 04 08:59 PM


All times are GMT +1. The time now is 05:36 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"