List all Open Workbooks in Combobox

Stephanie30

New Member
Joined
May 21, 2015
Messages
13
Hi

I am trying to create a userform in a MASTER workbook where I want help in listing all Open workbooks including CSV files listed in a Userform combo box.

This combobox should include all open workbooks including the ones which are not saved in the local drive.

The master WB should be excluded in the combobox and the code should list only the other open workbooks.


After the workbooks are listed in the combobox, the user should be able to select, unprotect the workbook and then be able to copy data from all tabs within the selected WB and then paste it in Master Workbook by creating extra worksheets.
The code should be able to name the extra worksheets in the Master WB as per the tab names in the source file

I hope the above is clear and it will be great if any one could help me on this
 

Excel Facts

Does the VLOOKUP table have to be sorted?
No! when you are using an exact match, the VLOOKUP table can be in any order. Best-selling items at the top is actually the best.
Stage 1 - load open workbooks, including csv's to combobox:
Code:
Private Sub UserForm_Activate()
    Dim i&
    For i = 1 To Application.Workbooks.Count
        If Not Application.Workbooks(i).Name = ActiveWorkbook.Name Then ComboBox1.AddItem Application.Workbooks(i).Name
    Next
End Sub
 
Upvote 0

Forum statistics

Threads
1,224,817
Messages
6,181,149
Members
453,021
Latest member
Justyna P

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top