Sheets Name into array for form dropdown
if your combobox is called say cbSheets then
Sub LoadCombo()
dim ws as Worksheet
for each ws in Worksheets
cbSheets.Additem ws.name
next
end sub
you could call this sub from the form's initialise event:
Private Sub UserForm_Initialize()
LoadCombo
End Sub
Patrick Molloy
Microsoft Excel MVP
-----Original Message-----
Hi all.
I'm tring to make a small form with a dropdown list on
it, that picks up all sheet tab names in the workbook,
while excluding three sheets.
I've never done a form before, so what kind of coding
would i need? I.e. a function or a macro?
And i guess the function/macro would need to put the
results into a variable array, so then the dropdown box
would read it. Is this correct?
Cheers.
Al.
.
|