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 to run Macro functionality for a protected worksheet

i wanna what to know :-
run macro functionality for a protected worksheet
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 923
Default How to run Macro functionality for a protected worksheet

You need to include in your macro an unprotect statement, then reprotect
after the code is complete, replace the sheet name as required......

sub Test()

Sheets(1).Unprotect

'your code here!

Sheets(1).Protect DrawingObjects:=True, Contents:=True, Scenarios:=True

end sub


if you need to use a password then change it to.........

Sheets(1).Unprotect Password:="MyPassword"

Sheets(1).Protect DrawingObjects:=True, Contents:=True, Scenarios:=True,
Password:="MyPassword"



--
Cheers
Nigel



"aflriwanna" wrote in message
...
i wanna what to know :-
run macro functionality for a protected worksheet



  #3   Report Post  
Posted to microsoft.public.excel.programming
GS GS is offline
external usenet poster
 
Posts: 364
Default How to run Macro functionality for a protected worksheet

You can allow VBA code access to a protected sheet by including the following
parameter in the .Protect statement:

userinterfaceonly:=True

This does not persist after the workbook is closed, so needs to be initiated
each time it's opened.

Regards,
GS
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
Do not allow Copy/Paste Functionality in a Protected Sheet Prashanth KR Excel Worksheet Functions 1 October 29th 07 06:12 PM
Running of Worksheet Change Macro breaks undo functionality. Rob Manger Excel Discussion (Misc queries) 1 April 6th 06 04:04 AM
Tab key functionality in a protected worksheet Lowkey Excel Programming 1 July 19th 05 06:08 PM
Enable 'BOLD' functionality in protected Excel spreadsheet Gareth Excel Discussion (Misc queries) 1 July 1st 05 11:03 PM
How can I run a macro in a protected worksheet? Husker87 Excel Worksheet Functions 2 March 30th 05 11:14 PM


All times are GMT +1. The time now is 10:41 PM.

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"