list Workbooks in Current Folder
Hi jurgenC
something like that (not very elegant, but it seeems to
work):
Sub FindAllWorkbooks()
Dim strBook As String
ThisWorkbook.Worksheets("Workbook Overview").Select
Range("a1").Select
strBook = Dir("c:\project\*.xls", vbDirectory)
ActiveCell.Value = strBook
Do While strBook < ""
strBook = Dir
If strBook < "MasterWorkbook" Then
ActiveCell.Value = strBook
ActiveCell.Offset(1, 0).Select
End If
Loop
'if you want to sort it
Range("a:a").Sort key1:=Range("a1")
Range("a1").Select
End Sub
Best regards
Wolf
WLamik<atgmx.net
-----Original Message-----
hi all,
your help is mostly appreciated for following:
i have a dedicated folder (called "Project" for example)
which has
following Workbooks:
Workbook1
Workbook2
Workbook3
and most important
MasterWorkbook
now i would like to have a macro which is executed in the
MasterWorkbook that will generate the list of all the
Workbooks in the
folder where the MasterWorkbook resides ("Project" folder
in this
example) except for the MasterWorkbook itself on a
specific sheet
(called "Workbook Overview" for example).
in this example on MasterWorkbook.Workbook Overview the
list would be
as follow:
Workbook1
Workbook2
Workbook3
thanking you for your time - cheers...
....jurgenC!
.
|