ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   How to retrieve index of workbooks (https://www.excelbanter.com/excel-programming/320676-how-retrieve-index-workbooks.html)

Dale[_15_]

How to retrieve index of workbooks
 
Hi
I have 7 workbooks open at the same time. I use the master workbook to copy
one of each of the master worksheets into each of the other open workbooks.
How do I retrieve the index and not the name of each workbook? i.e.
workbook(2) and not workbook("test.xls").


Thanks for your help.



Don Lloyd

How to retrieve index of workbooks
 
Hi,

If it helps, the indices will be in the order in which the workbooks are
opened.

regards,
Don

"Dale" wrote in message
...
Hi
I have 7 workbooks open at the same time. I use the master workbook to
copy one of each of the master worksheets into each of the other open
workbooks. How do I retrieve the index and not the name of each workbook?
i.e.
workbook(2) and not workbook("test.xls").


Thanks for your help.





Norman Jones

How to retrieve index of workbooks
 
Hi Dale

If you open the workbooks in code you could st an identifying object
variable for each, e.g.:

Set wb1 = Workbooks.Open("Book1")
Set wb2 = Workbooks.Open("Book2")

etc.

---
Regards,
Norman



"Dale" wrote in message
...
Hi
I have 7 workbooks open at the same time. I use the master workbook to
copy one of each of the master worksheets into each of the other open
workbooks. How do I retrieve the index and not the name of each workbook?
i.e.
workbook(2) and not workbook("test.xls").


Thanks for your help.






All times are GMT +1. The time now is 02:39 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com