Home |
Search |
Today's Posts |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Valeria,
You may want to modify Patrick's code so as to avoid hidden workbooks and the workbook containing the code, viz. For Each wb In Workbooks If wb.Windows(1).Visible And wb.Name < ThisWorkbook.Name Then ComboBox1.AddItem wb.Name End If Next wb Kevin Beckham -----Original Message----- if you put a combobox onto a userform, you can populate it like this: Option ExplicitPrivate Sub UserForm_Initialize() Dim wb As Workbook ComboBox1.AddItem "Select Workbook..." For Each wb In Workbooks ComboBox1.AddItem wb.Name Next ComboBox1.ListIndex = 0 End Sub Private Sub cmdOK_Click() If ComboBox1.ListIndex = 0 Then Exit Sub 'process workbook End Sub Patrick Molloy Microsoft Excel MVP -----Original Message----- Dear experts, I have written a macro that works on the active workbook. I would like instead to get a list of the opened workbooks in Excel, and be able to select one (maybe through an inputbox?) on which the macro has to work. Is this possible? Many thanks! Kind regards, Valeria . . |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Filter multiple workbooks from drop down list selection | Excel Worksheet Functions | |||
History of Workbooks opened | Excel Worksheet Functions | |||
Troubleshoot links - both workbooks have to be opened? | Excel Discussion (Misc queries) | |||
always prompted to save opened workbooks | Excel Discussion (Misc queries) | |||
limit cell list selection based on the selection of another list | Excel Worksheet Functions |