Hi
Take a look at Ron de Bruin's site. There is lots of code there that can
be adapted to what you want.

Signature
Regards
Roger Govier
>I have over 30 excel worksheets that are:
> 1. Password protected
[quoted text clipped - 15 lines]
>
> Thank you in advance.
alegria4ever - 23 Jan 2007 15:59 GMT
Thanks Roger!
I have modified the code but it still is not working right, it only
copies the data on the first workbook it opens and then it doesn't do
anything to the other workbook. Can you tell me why the following code
isn't working?
Sub OpenAllWorkbooksInFolder()
Application.EnableEvents = False
Application.ScreenUpdating = False
Dim i As Integer
Dim MyPath As String
Dim SourceRcount As Long
Dim sourceRange As Range
Dim destrange As Range
Dim rnum As Long
Dim Fnum As Long
Dim mybook As Workbook
Dim basebook As Workbook
Set basebook = ThisWorkbook
MyPath = "C:\Test\"
rnum = 12
With Application.FileSearch
.LookIn = MyPath
'* represents wildcard characters
.FileType = msoFileTypeExcelWorkbooks
If .Execute > 0 Then 'Workbook exists
For i = 1 To .FoundFiles.Count
Set mybook = Workbooks.Open(.FoundFiles(i),
Password:="password")
Sheets("All").Unprotect Password:="password"
Range("A11:X11").AutoFilter
Columns("B:X").EntireColumn.Hidden = False
Set sourceRange =
mybook.Worksheets("All").Range("B12:X" &
ActiveCell.SpecialCells(xlCellTypeLastCell).Row)
SourceRcount = sourceRange.Rows.Count
Set destrange =
basebook.Worksheets("Combined").Range("B" & rnum)
' This will add the workbook name in column Y if you
want
basebook.Worksheets("Combined").Cells(rnum, "Y").Value
= mybook.Name
With sourceRange
Set destrange =
basebook.Worksheets("Combined").Cells(rnum, "B"). _
Resize(.Rows.Count, .Columns.Count)
End With
destrange.Value = sourceRange.Value
rnum = rnum + SourceRcount
mybook.Close savechanges:=False
Next i
Else 'There is NOT a Workbook
MsgBox "The Workbook does not exist"
End If
End With
Application.EnableEvents = True
Application.