LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 683
Default using pword and auto protect

This is what i currently use to auto protect sheet, but i want to add a
password to this, (2468) so that the protection is password protected, but i
do not know how
the current syntax can be adjusted to perform this request?
I tried to put a password on the regular way of protect and then entering a
pword, however when the workbook opens up it goes into a debug error and I
have to have this sheet protected automatically because without it set up
that way one of my macros doesnt work.

Option Explicit

Private Sub Workbook_Open()
ThisWorkbook.Sheets("Patrol Log") _
.Protect DrawingObjects:=True, _
contents:=True, Scenarios:=True, _
UserInterfaceOnly:=True
End Sub

 
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
how to set auto protect workbook on exit? West Excel Worksheet Functions 4 October 2nd 06 03:19 AM
How do I auto-protect a worksheet? West Excel Worksheet Functions 1 March 31st 05 03:39 AM
can I send authentication data i.e. username & pword from an exce. moffett Excel Programming 1 September 21st 04 12:45 AM
auto protect or run VBA? Michel[_3_] Excel Programming 2 September 15th 03 08:50 PM
Macro to protect with pword in 97 Wes[_4_] Excel Programming 1 September 15th 03 05:34 PM


All times are GMT +1. The time now is 08:30 PM.

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"