I want to put the names of the files that are opening to the control source of combobox. I wrote the following scipts:
Sub Test()
nw = Workbooks.Count
For w = 1 To nw
fn = Workbooks(w).Name
UserForm1.ComboBox1.ControlSource = fn
Next w
UserForm1.Show
End Sub
But that doesn’t work. How should I write the scipt? Thanks
Sub Test()
nw = Workbooks.Count
For w = 1 To nw
fn = Workbooks(w).Name
UserForm1.ComboBox1.ControlSource = fn
Next w
UserForm1.Show
End Sub
But that doesn’t work. How should I write the scipt? Thanks