Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
I'd bet that the password isn't really 123 for all the worksheets in the
workbook that contains the code. Maybe you can add a line just to double check: For Each ws In ThisWorkbook.Worksheets msgbox "Processing: " & ws.name ws.Unprotect Password:="123" Next ws That may give you a hint. SLD wrote: I copied the unprotect macroe Sub Unprotect_All_Sheets() Dim ws As Worksheet For Each ws In ThisWorkbook.Worksheets ws.Unprotect Password:="123" Next ws End Sub and it is still giving me an error on the 4th line. the passwords are the same on both macroes. What am I doing wrong? -- Dave Peterson |
#2
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
if i used the protect all ws macroe, would that not put the same password on
all ws? "Dave Peterson" wrote: I'd bet that the password isn't really 123 for all the worksheets in the workbook that contains the code. Maybe you can add a line just to double check: For Each ws In ThisWorkbook.Worksheets msgbox "Processing: " & ws.name ws.Unprotect Password:="123" Next ws That may give you a hint. SLD wrote: I copied the unprotect macroe Sub Unprotect_All_Sheets() Dim ws As Worksheet For Each ws In ThisWorkbook.Worksheets ws.Unprotect Password:="123" Next ws End Sub and it is still giving me an error on the 4th line. the passwords are the same on both macroes. What am I doing wrong? -- Dave Peterson |
#3
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Depends on if that worked correctly and if anybody/any code changed the
password. I'd still bet that the password isn't what you think. SLD wrote: if i used the protect all ws macroe, would that not put the same password on all ws? "Dave Peterson" wrote: I'd bet that the password isn't really 123 for all the worksheets in the workbook that contains the code. Maybe you can add a line just to double check: For Each ws In ThisWorkbook.Worksheets msgbox "Processing: " & ws.name ws.Unprotect Password:="123" Next ws That may give you a hint. SLD wrote: I copied the unprotect macroe Sub Unprotect_All_Sheets() Dim ws As Worksheet For Each ws In ThisWorkbook.Worksheets ws.Unprotect Password:="123" Next ws End Sub and it is still giving me an error on the 4th line. the passwords are the same on both macroes. What am I doing wrong? -- Dave Peterson -- Dave Peterson |
#4
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Where do I insert the line you sugest?
For Each ws In ThisWorkbook.Worksheets msgbox "Processing: " & ws.name ws.Unprotect Password:="123" Next ws "Dave Peterson" wrote: Depends on if that worked correctly and if anybody/any code changed the password. I'd still bet that the password isn't what you think. SLD wrote: if i used the protect all ws macroe, would that not put the same password on all ws? "Dave Peterson" wrote: I'd bet that the password isn't really 123 for all the worksheets in the workbook that contains the code. Maybe you can add a line just to double check: For Each ws In ThisWorkbook.Worksheets msgbox "Processing: " & ws.name ws.Unprotect Password:="123" Next ws That may give you a hint. SLD wrote: I copied the unprotect macroe Sub Unprotect_All_Sheets() Dim ws As Worksheet For Each ws In ThisWorkbook.Worksheets ws.Unprotect Password:="123" Next ws End Sub and it is still giving me an error on the 4th line. the passwords are the same on both macroes. What am I doing wrong? -- Dave Peterson -- Dave Peterson |
#5
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
right where I wrote it. Just above the line causing the trouble.
Then when/if the line fails, you'll remember the last worksheet name that was shown to you. That's the one to check. SLD wrote: Where do I insert the line you sugest? For Each ws In ThisWorkbook.Worksheets msgbox "Processing: " & ws.name ws.Unprotect Password:="123" Next ws "Dave Peterson" wrote: Depends on if that worked correctly and if anybody/any code changed the password. I'd still bet that the password isn't what you think. SLD wrote: if i used the protect all ws macroe, would that not put the same password on all ws? "Dave Peterson" wrote: I'd bet that the password isn't really 123 for all the worksheets in the workbook that contains the code. Maybe you can add a line just to double check: For Each ws In ThisWorkbook.Worksheets msgbox "Processing: " & ws.name ws.Unprotect Password:="123" Next ws That may give you a hint. SLD wrote: I copied the unprotect macroe Sub Unprotect_All_Sheets() Dim ws As Worksheet For Each ws In ThisWorkbook.Worksheets ws.Unprotect Password:="123" Next ws End Sub and it is still giving me an error on the 4th line. the passwords are the same on both macroes. What am I doing wrong? -- Dave Peterson -- Dave Peterson -- Dave Peterson |
#6
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
This is working, but when you have over 100 tabs it is hard to keep track of
when the last mesege box is going to error out on me. Is there a line that I can enter that will give me a report that i can clearly see what was the last tab, or can it take me to the tab that does not have the correct password? "Dave Peterson" wrote: right where I wrote it. Just above the line causing the trouble. Then when/if the line fails, you'll remember the last worksheet name that was shown to you. That's the one to check. SLD wrote: Where do I insert the line you sugest? For Each ws In ThisWorkbook.Worksheets msgbox "Processing: " & ws.name ws.Unprotect Password:="123" Next ws "Dave Peterson" wrote: Depends on if that worked correctly and if anybody/any code changed the password. I'd still bet that the password isn't what you think. SLD wrote: if i used the protect all ws macroe, would that not put the same password on all ws? "Dave Peterson" wrote: I'd bet that the password isn't really 123 for all the worksheets in the workbook that contains the code. Maybe you can add a line just to double check: For Each ws In ThisWorkbook.Worksheets msgbox "Processing: " & ws.name ws.Unprotect Password:="123" Next ws That may give you a hint. SLD wrote: I copied the unprotect macroe Sub Unprotect_All_Sheets() Dim ws As Worksheet For Each ws In ThisWorkbook.Worksheets ws.Unprotect Password:="123" Next ws End Sub and it is still giving me an error on the 4th line. the passwords are the same on both macroes. What am I doing wrong? -- Dave Peterson -- Dave Peterson -- Dave Peterson |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
I have a excel file and forgot the password | Excel Discussion (Misc queries) | |||
Excel file automatically opens | Excel Discussion (Misc queries) | |||
Remove or change password protected excel file | Excel Discussion (Misc queries) | |||
password protection of an MHTML Excel file | Excel Discussion (Misc queries) | |||
How Do I open an excel file without Excel Viewer support | Excel Discussion (Misc queries) |