View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Rick B[_6_] Rick B[_6_] is offline
external usenet poster
 
Posts: 12
Default SaveAs Method and sheet protection


Using the following code, my tests showed that protection followed.

ActiveWorkbook.SaveAs Filename:= _
"C:\temp\test.xls", FileFormat _
:=xlNormal, Password:="", WriteResPassword:="",
ReadOnlyRecommended:= _
False, CreateBackup:=False

However, you can always add protection through code using:

ActiveSheet.Protect DrawingObjects:=True, Contents:=True, Scenarios:=True


"BrianG" wrote in message
...
If I us the SaveAs Method from within and Excell 97 macro should the
sheet protection status follow be maintained in the saved file? I get
the impression from the help file that it should but tests don't bear
that out.

--
BrianG



*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!