I assume you have a password for them and aren't trying to crack them? If so you can use this:
Dim theWB As Workbook
Dim fso As FileSystemObject: Set fso = New FileSystemObject
Dim theFolder As Folder: Set theFolder = fso.GetFolder("YourFolderPath")
Dim theFile As File
On Error Resume Next
For Each theFile In theFolder.Files
If theFile.Type = "Microsoft Excel Worksheet" Then
Set theWB = Workbooks.Open(theFile.Path)
On Error GoTo 0
Set theWB = Nothing
Set fso = Nothing
1. Put all your workbooks in a folder and put the folder path in the GetFolder above
2. Put the password in the unprotect above
3. Go to Tool -> References -> set a reference to Microsoft Scripting runtime
4. Run the macro...
Hope that helps, give me a shout if there're any bugs! =D
umm i think we are talking about different things... it doesn't have a password at all.. i am not trying to 'crack' or anything... let me explain a little more... maybe im not making sense.. I have 79 workbooks and ea. workbook has one worksheet. I need to unprotect those worksheets in the workbook. and instead going into ea. workbook and unprotecting the worksheet... i was hoping for a way i could do it automatically through a Macro or something... is this still wrong to ask??
and sorry if i am making a mistake asking this.... i saw some question on unprotecting worksheets in a single workbook so i thought it was ok to ask...
correct... so i am opening all 79 workbooks and i want it to go into ea. workbook and go to the only sheet in ea. workbook and unprotect... all at once... i dont' want to have to run it for ea. workbook .... is there a way.. and
will this do that?