userform to display dropdown list of open XL files
Create a userform and add two combo boxs to it. Add this code to the form and
you will get your two combo boxes...
Private Sub UserForm_Initialize()
Dim wbk As Workbook
For Each wbk In Workbooks
ComboBox1.AddItem wbk.Name
ComboBox2.AddItem wbk.Name
Next wbk
End Sub
--
HTH...
Jim Thomlinson
"davegb" wrote:
I want to create a userform to display 2 dropdown lists, both with all
currently opened XL files in the list, so the user can select 2 files
to compare.
I've tried reverse engineering Chip Pearson's code in his "Compare"
macro, but it's just beyond my current skill level. And I looked for
information in this NG, but couldn't find a solution, probably I just
don't know how to phrase the search criteria correctly.
I have almost no experience with forms in XL, other than creating a
simple form to ask the user for input and put the data in a cell. But I
do know how to create a basic form.
Thanks.
|