How to run Macro functionality for a protected worksheet
i wanna what to know :-
run macro functionality for a protected worksheet |
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 |
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 |
All times are GMT +1. The time now is 01:22 AM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com