![]() |
protect sheet macro - can't have it enter password
Simple problem I think.
I record a macro to protect a sheet and enter the password durin recording. However, when I play the macro, the sheet is protected bu it is not password protected. It can be unprotected without entering password. Why isn't the password part of the macro? And how do I get it in ther ???? -- Message posted from http://www.ExcelForum.com |
protect sheet macro - can't have it enter password
Replace a line in your code that would be similar to this
To Protect an active sheet ActiveSheet.Protect PASSWORD:="Password Phrase Here", DrawingObjects:=True, Contents:=True, Scenarios:=True To Unprotect an active sheet ActiveSheet.Unprotect PASSWORD:="Password Phrase Here" --- Message posted from http://www.ExcelForum.com/ |
protect sheet macro - can't have it enter password
inaz,
Why it doesn't record the password, I couldn't tell ya' Go into the VBA editor and add the following to the recorded line: , password:="yourpassword" The whole line should read something like this: ActiveSheet.Protect DrawingObjects:=True, Contents:=True, Scenarios:=True, password:="yourpassword" John "inaz " wrote in message ... Simple problem I think. I record a macro to protect a sheet and enter the password during recording. However, when I play the macro, the sheet is protected but it is not password protected. It can be unprotected without entering a password. Why isn't the password part of the macro? And how do I get it in there ????? --- Message posted from http://www.ExcelForum.com/ |
protect sheet macro - can't have it enter password
|
protect sheet macro - can't have it enter password
inaz,
No problem. Happy to have been a help. John "inaz " wrote in message ... Works great - Thanks alot :D --- Message posted from http://www.ExcelForum.com/ |
All times are GMT +1. The time now is 12:35 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com