ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   List Open Workbooks in a combobox (https://www.excelbanter.com/excel-programming/340200-list-open-workbooks-combobox.html)

JasonSelf[_21_]

List Open Workbooks in a combobox
 

I am looking to create a combobox that has a list of every currently
open workbook in excel. what property would I need to pull to do
this? Would I need to use an array?

Thanks,
Jason


--
JasonSelf
------------------------------------------------------------------------
JasonSelf's Profile: http://www.excelforum.com/member.php...fo&userid=5330
View this thread: http://www.excelforum.com/showthread...hreadid=467950


Ron de Bruin

List Open Workbooks in a combobox
 
You can loop through the selection and add them to the combobox

Dim wb As Workbook
For Each wb In Application.Workbooks
MsgBox wb.Name
Next wb


--
Regards Ron de Bruin
http://www.rondebruin.nl


"JasonSelf" wrote in message
...

I am looking to create a combobox that has a list of every currently
open workbook in excel. what property would I need to pull to do
this? Would I need to use an array?

Thanks,
Jason


--
JasonSelf
------------------------------------------------------------------------
JasonSelf's Profile: http://www.excelforum.com/member.php...fo&userid=5330
View this thread: http://www.excelforum.com/showthread...hreadid=467950




zzzzzzzzz

List Open Workbooks in a combobox
 
something like this
or maybe for each window in windows
try recording a macro and just select different workbooks and see what the
code turns up then use it as below

dim wb as workbook
for each wb in workbooks
combobox.item.add wb.name
next

"JasonSelf" wrote:


I am looking to create a combobox that has a list of every currently
open workbook in excel. what property would I need to pull to do
this? Would I need to use an array?

Thanks,
Jason


--
JasonSelf
------------------------------------------------------------------------
JasonSelf's Profile: http://www.excelforum.com/member.php...fo&userid=5330
View this thread: http://www.excelforum.com/showthread...hreadid=467950




All times are GMT +1. The time now is 12:37 PM.

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