SaveAs Method and sheet protection

B

BrianG

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!
 
R

Rick B

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top