Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 53
Default Macros on Protected worksheet

How can I allow a macro command within a protected worksheet?
--
Ronnie
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 5,939
Default Macros on Protected worksheet

2 ways.

1 - Change the protection to allow macros to modify the sheet. This requires
the addition of a parameter to the protection

Sheets("Sheet1").Protect UserInterfaceOnly:=true

2 - Unprotect the sheet. Run your code. Reprotect the sheet

Sheets("Sheet1").UnProtect Password:="Whatever"
'Your code here
Sheets("Sheet1").Protect Password:="Whatever"

--
HTH...

Jim Thomlinson


"Ronnie" wrote:

How can I allow a macro command within a protected worksheet?
--
Ronnie

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 53
Default Macros on Protected worksheet

Thanks! I'll give it a try.
--
Ronnie


"Jim Thomlinson" wrote:

2 ways.

1 - Change the protection to allow macros to modify the sheet. This requires
the addition of a parameter to the protection

Sheets("Sheet1").Protect UserInterfaceOnly:=true

2 - Unprotect the sheet. Run your code. Reprotect the sheet

Sheets("Sheet1").UnProtect Password:="Whatever"
'Your code here
Sheets("Sheet1").Protect Password:="Whatever"

--
HTH...

Jim Thomlinson


"Ronnie" wrote:

How can I allow a macro command within a protected worksheet?
--
Ronnie

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
Run macros on protected worksheet Lisa D'K Excel Worksheet Functions 0 February 4th 06 08:06 PM
Run macros on protected worksheet paul Excel Worksheet Functions 0 February 4th 06 11:53 AM
allow macros in protected worksheet Marge Excel Worksheet Functions 1 May 25th 05 04:23 PM
Is is possible to run macros on a protected worksheet petunia Excel Worksheet Functions 1 January 18th 05 04:55 PM


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