Set RowSource for ListBox
Hi,
you could save yourself a lot of headaches if you just range name the data
source. Select the range A1:A20 or where ever the items are, and type a name
into the Name Box and press Enter. Suppose you named the range myList then
the row source line of the list/combo box would read myList. Range names
don't allow spaces.
Result: No quotes needed, no spreadsheet references needed, shorter name
less likely to produce a typo. And of course you can use the name in code if
you choose.
Range("myList").Select or [myList].Select for example.
--
Thanks,
Shane Devenshire
"Patrick C. Simonds" wrote:
I want to set the RowSource for a ListBox I have on a UserForm, to the range
A2:A20 on the worksheet named Storage Locations (this worksheet is in the
same workbook). I have been unsuccessful. Any help would be appreciated.
|