Open Workbooks Return
How do I programmically return the currently open workbooks so as to load a
ComboBox? -- Trent Argante [DC.J(192)] |
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)] |
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)] |
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)] |
All times are GMT +1. The time now is 04:57 AM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com