index and names of open workbooks
Thank you Garry. That is what I was looking for. By the way, is there a
way of getting the index of the workbooks.
Bob
"Gary Keramidas" <GKeramidasATmsn.com wrote in message
...
maybe something like this. they will be displayed in the immediate window
Sub test()
Dim wb As Workbook
Dim ws As Worksheet
For Each wb In Application.Workbooks
Debug.Print wb.Name
For Each ws In wb.Worksheets
Debug.Print ws.Name, ws.Index
Next
Next
End Sub
--
Gary
"Bob" wrote in message
...
Hi Everyone:
In excel, is there a way I can get the index and name of all open
workbooks, and once I have that information, to get the name and index of
worksheets on each book? I would appreciate a sample code. Thanks for
your help.
Bob
|