Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 72
Default 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.


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6,953
Default 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.



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 72
Default 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.





Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
using find in 2 or 3 workbooks that are open Debbie S Excel Discussion (Misc queries) 1 September 13th 05 12:41 AM
how to open workbooks with different names Kanan Excel Programming 8 May 6th 05 11:28 PM
find open workbooks Costas[_2_] Excel Programming 1 September 24th 04 02:43 PM
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 Frank Jones Excel Programming 2 June 15th 04 03:21 AM
Open workbooks with different names Jako[_10_] Excel Programming 3 May 8th 04 06:09 AM


All times are GMT +1. The time now is 07:07 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"