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
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" <dave.lyntel@iinet.net.au> 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
Hi Jim
Thanks for that - works a treat
Dave.
"Jim Cone" <jim.coneXXX@rcn.comXXX> wrote in message
news:uPlXN3SLGHA.532@TK2MSFTNGP15.phx.gbl...
> 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" <dave.lyntel@iinet.net.au> 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
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks