View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Gary Keramidas Gary Keramidas is offline
external usenet poster
 
Posts: 2,494
Default index and names of open workbooks

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