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: 14
Default Worksheet Protection

I have a template worksheet that I am trying to use a macro to set passwords
to protect:
1) the workbook level to allow only employee access
2) the worksheet level to protect formulas from being overwritten and limit
access to myself

The attached macro saves the template as a separate filename and tries to
accomplish the objectives listed above. But when I go into the saved
worksheet, only the workbook is protected. The worksheet isn't. What am I
doing wrong?

Sheets("Selections1").Select
ActiveSheet.Protect DrawingObjects:=True, Contents:=True,
Scenarios:=True, Password:="PASSWORD1"
Sheets("Selections2").Select
ActiveSheet.Protect DrawingObjects:=True, Contents:=True,
Scenarios:=True, Password:="PASSWORD1"
myFileName = Sheet8.Range("D2").Value & Sheet8.Range("B2").Value
ActiveWorkbook.SaveAs Filename:="V:\Selections\Jobs\" & myFileName &
".xls", _
FileFormat:=xlNormal, Password:="PASSWORD2", WriteResPassword:="", _
ReadOnlyRecommended:=False, CreateBackup:=True


 
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
Worksheet Protection Susan Excel Worksheet Functions 3 January 19th 08 01:10 AM
Cell Protection vs. Worksheet Protection kmwhitt Excel Discussion (Misc queries) 4 September 24th 06 02:37 AM
Worksheet protection is gone and only wokbook protection can be se Eric C. Excel Discussion (Misc queries) 4 May 2nd 06 04:50 PM
Worksheet Protection stwky Excel Discussion (Misc queries) 3 April 12th 05 10:21 AM
worksheet protection losmac Excel Programming 0 August 20th 03 10:01 PM


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