Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 39
Default Open Workbooks Return

How do I programmically return the currently open workbooks so as to load a
ComboBox?
--
Trent Argante
[DC.J(192)]
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 983
Default Open Workbooks Return

Here is how to get the workbooks...

Sub ListBooks()
Dim wbk As Workbook

For Each wbk In Workbooks
MsgBox wbk.Name
Next wbk
End Sub

Load the combo box where the message box currently lives. This will only
look at one instance of Excel. If the user were to open two copies of Excel
you would only get the workbooks from this one instance. Dealing with two
instances of Excel is distinctly difficult.

HTH

"Trent Argante" wrote:

How do I programmically return the currently open workbooks so as to load a
ComboBox?
--
Trent Argante
[DC.J(192)]

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 39
Default Open Workbooks Return

Jim,
Thanks a bunch! I totally had my thinking cap off. Thanks for rattling the
brain for me.
Trent

"Jim Thomlinson" wrote:

Here is how to get the workbooks...

Sub ListBooks()
Dim wbk As Workbook

For Each wbk In Workbooks
MsgBox wbk.Name
Next wbk
End Sub

Load the combo box where the message box currently lives. This will only
look at one instance of Excel. If the user were to open two copies of Excel
you would only get the workbooks from this one instance. Dealing with two
instances of Excel is distinctly difficult.

HTH

"Trent Argante" wrote:

How do I programmically return the currently open workbooks so as to load a
ComboBox?
--
Trent Argante
[DC.J(192)]

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 983
Default Open Workbooks Return

Don't feel bad. My brain rattles at the best of times... Just ask my wife. :)

Glad to help...

"Trent Argante" wrote:

Jim,
Thanks a bunch! I totally had my thinking cap off. Thanks for rattling the
brain for me.
Trent

"Jim Thomlinson" wrote:

Here is how to get the workbooks...

Sub ListBooks()
Dim wbk As Workbook

For Each wbk In Workbooks
MsgBox wbk.Name
Next wbk
End Sub

Load the combo box where the message box currently lives. This will only
look at one instance of Excel. If the user were to open two copies of Excel
you would only get the workbooks from this one instance. Dealing with two
instances of Excel is distinctly difficult.

HTH

"Trent Argante" wrote:

How do I programmically return the currently open workbooks so as to load a
ComboBox?
--
Trent Argante
[DC.J(192)]

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
Open Dialog Box to return Selected File Path and Not Open it. DMS Excel Programming 4 January 26th 10 12:46 PM
When I open Excel, workbooks open automatically. How can I stop t Rhealbird Excel Discussion (Misc queries) 2 February 23rd 06 10:08 AM
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
Workbooks.Open closes other workbooks S. Daum Excel Programming 1 August 21st 03 07:47 PM
Workbooks.Open / .Open Text - How do you stop the .xls addition? Dave[_20_] Excel Programming 2 July 31st 03 04:03 AM


All times are GMT +1. The time now is 07:42 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"