Find names of all open workbooks
Hi, is there a way to cycle through all possible open workbooks? In order
to get the name of each and store this in an array? Many thanks. |
Find names of all open workbooks
dim arNames() as String
Dim i as Long, bk as Workbook Redim arNames(1 to workbooks.count) i = 1 for each bk in Application.workbooks arNames(i) = bk.Name i = i + 1 Next -- Regards, Tom Ogilvy "Graham Whitehead" wrote: Hi, is there a way to cycle through all possible open workbooks? In order to get the name of each and store this in an array? Many thanks. |
Find names of all open workbooks
Thanks Tom
"Tom Ogilvy" wrote in message ... dim arNames() as String Dim i as Long, bk as Workbook Redim arNames(1 to workbooks.count) i = 1 for each bk in Application.workbooks arNames(i) = bk.Name i = i + 1 Next -- Regards, Tom Ogilvy "Graham Whitehead" wrote: Hi, is there a way to cycle through all possible open workbooks? In order to get the name of each and store this in an array? Many thanks. |
All times are GMT +1. The time now is 03:08 PM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com