Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 8
Default Protect Sheet with password through VBA

Is there a way to protect and unprotect (with a password) an Excel 2000 sheet
through VBA? I know the syntax for doing this without a password, but can it
be done with a password?

Thanks ...

Bill Morgan

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4,624
Default Protect Sheet with password through VBA

one way:

Const sPWORD As String = "drowssap"
Sheets("Sheet1").Protect Password:=sPWORD
Sheets("Sheet1").Unprotect Password:=sPWORD


In article ,
"bill_morgan_3333" wrote:

Is there a way to protect and unprotect (with a password) an Excel 2000 sheet
through VBA? I know the syntax for doing this without a password, but can it
be done with a password?

Thanks ...

Bill Morgan

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 8
Default Protect Sheet with password through VBA

Perfect. Thank you ...

"JE McGimpsey" wrote:

one way:

Const sPWORD As String = "drowssap"
Sheets("Sheet1").Protect Password:=sPWORD
Sheets("Sheet1").Unprotect Password:=sPWORD


In article ,
"bill_morgan_3333" wrote:

Is there a way to protect and unprotect (with a password) an Excel 2000 sheet
through VBA? I know the syntax for doing this without a password, but can it
be done with a password?

Thanks ...

Bill Morgan


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
password protect a sheet Joe Excel Discussion (Misc queries) 5 October 27th 08 11:14 PM
Protect sheet without password? EllenM Excel Discussion (Misc queries) 2 June 21st 07 03:22 PM
password protect a single sheet stumac Excel Discussion (Misc queries) 0 March 28th 07 12:12 AM
Password Protect a Sheet Lynn Excel Discussion (Misc queries) 1 October 27th 06 03:41 PM
password protect one sheet in within file DSK_7[_2_] Excel Programming 1 November 24th 04 01:23 PM


All times are GMT +1. The time now is 04:12 AM.

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

About Us

"It's about Microsoft Excel"