Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Excel2007; workbooks.count is not counting all open workbooks | Excel Programming | |||
Find names of all open workbooks | Excel Programming | |||
how to open workbooks with different names | Excel Programming | |||
Excel 2003 Workbooks.Open with CorruptLoad=xlRepairFile fails on Excel 5.0/95 file due to Chart, with Error 1004 Method 'Open' of object 'Workbooks' failed | Excel Programming | |||
Open workbooks with different names | Excel Programming |