Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9
Default Password setting syntax

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,290
Default Password setting syntax

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9
Default Password setting syntax

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
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
Allow disabling of password, but no setting of password KobusD Excel Programming 1 September 7th 05 02:25 PM
Password Setting VBALearner Excel Programming 6 August 9th 05 03:39 AM
Setting VBA Project Password Howard Kaikow Excel Programming 4 May 18th 05 03:28 PM
Setting an Open-file password Terry Excel Programming 3 April 6th 05 01:24 AM
Setting Password & WriteResPassword Kevin H. Stecyk[_2_] Excel Programming 0 January 27th 05 02:16 AM


All times are GMT +1. The time now is 08:07 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"