LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Brian
 
Posts: n/a
Default Auto Protect workbook with password upon opening

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
Unprotect Workbook Kent Excel Discussion (Misc queries) 1 February 4th 05 01:07 AM
Why is workbook so slow opening? Carl Nielsen Excel Discussion (Misc queries) 1 January 28th 05 12:07 AM
can we password protect a .csv file? Lakshmi Excel Discussion (Misc queries) 1 January 4th 05 08:15 PM
Error message opening Excel97 workbook cobbler Excel Discussion (Misc queries) 2 December 11th 04 05:31 PM
Password protect cells PivotTable & allow the Pivot Table to refre KJThams Excel Worksheet Functions 2 November 30th 04 04:13 AM


All times are GMT +1. The time now is 08:29 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"