E
excel-tr
hi,
I added below code, but I cannot see worksheet names from workbooks in sub
folders ? what is the problem ?
..SearchSubFolders = IncludeSubFolder
for example
I can get the names from d:\1\*.xls , d:\1\2\*.xls
but I cannot see the name of a worksheet in a.xls
d:\1\2\3\a.xls
If I want to see the directory of each worksheet next to the name of it how
can we revise the code?
for example;
book ( name of worksheet ) D:\library\...a.xls
I added below code, but I cannot see worksheet names from workbooks in sub
folders ? what is the problem ?
..SearchSubFolders = IncludeSubFolder
for example
I can get the names from d:\1\*.xls , d:\1\2\*.xls
but I cannot see the name of a worksheet in a.xls
d:\1\2\3\a.xls
If I want to see the directory of each worksheet next to the name of it how
can we revise the code?
for example;
book ( name of worksheet ) D:\library\...a.xls
.SearchSubFolders = IncludeSubFolderSub GetAllWorksheetNames()
Dim i As Integer
Dim wbResults As Workbook
Dim wbCodeBook As Workbook
Dim wSheet As Worksheet
Application.ScreenUpdating = False
Application.DisplayAlerts = False
Application.EnableEvents = False
On Error Resume Next
Set wbCodeBook = ThisWorkbook
With Application.FileSearch
.NewSearch
.LookIn = "C:\my documents" 'amend to suit