Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi,
I'm trying to write code that protects the active sheet, using a password (eg: dave) I've tried: ActiveSheet.Protect (dave) and ActiveSheet.Protect Password:=dave Both these lines of code protect the sheet, but allow it to be unprotected without prompting for the password I'm using XL2000, and can't find it in the VBA help. Regards - Dave |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Dave,
The Protect method requires a string for the password... ActiveSheet.Protect "dave" Also, if you enter "Option Explicit" (without the quote marks) as the first line in the module it will flag such mistakes. Jim Cone San Francisco, USA http://www.realezsites.com/bus/primitivesoftware "Dave" wrote in message Hi, I'm trying to write code that protects the active sheet, using a password (eg: dave) I've tried: ActiveSheet.Protect (dave) and ActiveSheet.Protect Password:=dave Both these lines of code protect the sheet, but allow it to be unprotected without prompting for the password I'm using XL2000, and can't find it in the VBA help. Regards - Dave |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi Jim
Thanks for that - works a treat Dave. "Jim Cone" wrote in message ... Dave, The Protect method requires a string for the password... ActiveSheet.Protect "dave" Also, if you enter "Option Explicit" (without the quote marks) as the first line in the module it will flag such mistakes. Jim Cone San Francisco, USA http://www.realezsites.com/bus/primitivesoftware "Dave" wrote in message Hi, I'm trying to write code that protects the active sheet, using a password (eg: dave) I've tried: ActiveSheet.Protect (dave) and ActiveSheet.Protect Password:=dave Both these lines of code protect the sheet, but allow it to be unprotected without prompting for the password I'm using XL2000, and can't find it in the VBA help. Regards - Dave |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Allow disabling of password, but no setting of password | Excel Programming | |||
Password Setting | Excel Programming | |||
Setting VBA Project Password | Excel Programming | |||
Setting an Open-file password | Excel Programming | |||
Setting Password & WriteResPassword | Excel Programming |