E
EW
I have a file that is first shared and secondly each sheet is shared. What
I'm running into is the part of the code that makes the file unshared. This
is the code so far. Thanks for any help in advance....
ub Unprotect_All()
Dim fileToOpen As Variant
Dim ws As Worksheet
Dim Wbk As Workbook
fileToOpen = Application.GetOpenFilename("Excel Files (*.xls), *.xls")
Application.ScreenUpdating = False
ActiveWorkbook.ExclusiveAccess
For Each ws In Worksheets
ws.Unprotect
Next ws
Application.KeepChangeHistory = True
Application.SaveAs _
AccessMode:=xlShared
Application.ScreenUpdating = True
End Sub
I'm running into is the part of the code that makes the file unshared. This
is the code so far. Thanks for any help in advance....
ub Unprotect_All()
Dim fileToOpen As Variant
Dim ws As Worksheet
Dim Wbk As Workbook
fileToOpen = Application.GetOpenFilename("Excel Files (*.xls), *.xls")
Application.ScreenUpdating = False
ActiveWorkbook.ExclusiveAccess
For Each ws In Worksheets
ws.Unprotect
Next ws
Application.KeepChangeHistory = True
Application.SaveAs _
AccessMode:=xlShared
Application.ScreenUpdating = True
End Sub