Hi,
I have the following macro in ThisWorkbook (suggested in another topic) to allow grouping and ungrouping in a password protected file.
Sub WorkBook_Open()
Application.ScreenUpdating = False
Dim n As Single
For n = 1 To Sheets.Count
With Sheets(n)
.Protect Password:="test", userinterfaceonly:=True
.EnableOutlining = True
.EnableAutoFilter = True
End With
Next n
Application.ScreenUpdating = True
End Sub
When i apply it to an excel 2000 file it works perfectly. But when i want to open the file in excel 2003 it gives an error:
Run-time error 1004: The password you supplied is not correct. Verify that the caps lock is off etc.etc.
This starts with the worksheets that use grouping. The other sheets before that sheet (with no grouping) are all password protected with the correct password.
Can anybody help? I'm new to macro's...
Thanx!
Michel
Bookmarks