Cant use this protectio method in a shared workbook???

S

Simon Lloyd

Can anyone help with this....i need to protect and unprotect a sheet i
a shared workbook but i cant work it out can anyone help heres the cod
i have.

Thanks,

Simon

Sub auto_close()

Sheets("Holidays").Select
ActiveSheet.Unprotect
With Application
.Calculation = xlManual
.MaxChange = 0.001
.CalculateBeforeSave = False
End With
ActiveWorkbook.PrecisionAsDisplayed = False
Range("A14:AK545").Select
Selection.sort Key1:=Range("A14"), Order1:=xlAscending
Header:=xlGuess, _
OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom
_
DataOption1:=xlSortNormal
Range("a1").Select
Application.DisplayAlerts = False
Application.DisplayFormulaBar = True
ActiveCell = xlNone

With Application
.Calculation = xlAutomatic
End With
ActiveSheet.Protect
ActiveWorkbook.Save
End Su
 

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