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

Show numbers in thousands?
Use a custom number format of #,##0,K. Each comma after the final 0 will divide the displayed number by another thousand
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,223,888
Messages
6,175,206
Members
452,618
Latest member
Tam84

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