Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() Hi, I have the followiing macro in ThisWorkbook (suggested in anothe 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 want to open the file in excel 2003 it gives an error: -Run-time error 1004: The password you supplied is not correct. Verif that the caps lock is off etc.etc.- This starts with the worksheets that use grouping. The other sheet before that sheet (with no grouping) are all password protected wit the correct password. Can anybody help? I'm new to macro's... Thanx! Miche -- michel ----------------------------------------------------------------------- michelr's Profile: http://www.excelforum.com/member.php...fo&userid=3437 View this thread: http://www.excelforum.com/showthread.php?threadid=54148 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Run-time error 1004 while conditionally hiding rows as a result ofworksheet protection | Excel Discussion (Misc queries) | |||
Error when save as CSV with VBA password protection on | Excel Discussion (Misc queries) | |||
HELP! Get error while saving after password protection | Excel Programming | |||
Run-Time 1004 password error | Excel Discussion (Misc queries) | |||
Error Trap for bypassing Password Protection | Excel Programming |