E
Ed from AZ
I have inherited an XL2007 workbook that was protected for sharing for
multiple users over a network. I have the password. What I don't
have is the understanding of how it was protected. I tried
Sub UnlockMe()
Dim wkb As Workbook
Dim wks As Worksheet
Set wkb = Workbooks.Open("C:\Documents and Settings\MyFile.xlsx", _
, False, , "password")
wkb.UnprotectSharing ("password")
For Each wks In wkb.Worksheets
wks.Unprotect ("password")
Next wks
MsgBox "Done!"
End Sub
This failed on the first wks.Unprotect - a glance at the locals window
says the wkb and wks objects have no variables.
In Review >> Changes, Unprotect Sheet is disabled, and there isn't any
Unprotect Workbook or Unprotect Shared Workbook.
What am I missing about protection here?
Ed
multiple users over a network. I have the password. What I don't
have is the understanding of how it was protected. I tried
Sub UnlockMe()
Dim wkb As Workbook
Dim wks As Worksheet
Set wkb = Workbooks.Open("C:\Documents and Settings\MyFile.xlsx", _
, False, , "password")
wkb.UnprotectSharing ("password")
For Each wks In wkb.Worksheets
wks.Unprotect ("password")
Next wks
MsgBox "Done!"
End Sub
This failed on the first wks.Unprotect - a glance at the locals window
says the wkb and wks objects have no variables.
In Review >> Changes, Unprotect Sheet is disabled, and there isn't any
Unprotect Workbook or Unprotect Shared Workbook.
What am I missing about protection here?
Ed