Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
RowSource
I have a named range, "CashierList" that I would like to populate a
listbox/combo box when the userform is initialized. When I attempt this the code crashes with error 380 (Could not set the RowSource property. Invalid property value). If I insert the code, "Me.listbox1.RowSource = Range("CashierList")". If I hard-code the range in the list box RowSource properties, it works fine, but I would rather use the UserForm1_Initialize event so I can change the RowSource depending on which worksheet is active. Any guidance would be appreciated. |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
RowSource
Try this:
Me.listbox1.RowSource = Range("CashierList").Address. The row source must equate to A1 format. "Sam" wrote in message ... I have a named range, "CashierList" that I would like to populate a listbox/combo box when the userform is initialized. When I attempt this the code crashes with error 380 (Could not set the RowSource property. Invalid property value). If I insert the code, "Me.listbox1.RowSource = Range("CashierList")". If I hard-code the range in the list box RowSource properties, it works fine, but I would rather use the UserForm1_Initialize event so I can change the RowSource depending on which worksheet is active. Any guidance would be appreciated. |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
RowSource
Actually, you could just:
Me.ListBox1.RowSource = "CashierList" That would make the row source a string value in A1 format. "Sam" wrote in message ... I have a named range, "CashierList" that I would like to populate a listbox/combo box when the userform is initialized. When I attempt this the code crashes with error 380 (Could not set the RowSource property. Invalid property value). If I insert the code, "Me.listbox1.RowSource = Range("CashierList")". If I hard-code the range in the list box RowSource properties, it works fine, but I would rather use the UserForm1_Initialize event so I can change the RowSource depending on which worksheet is active. Any guidance would be appreciated. |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
RowSource
Me.listbox1.RowSource = "CashierList"
"Sam" wrote: I have a named range, "CashierList" that I would like to populate a listbox/combo box when the userform is initialized. When I attempt this the code crashes with error 380 (Could not set the RowSource property. Invalid property value). If I insert the code, "Me.listbox1.RowSource = Range("CashierList")". If I hard-code the range in the list box RowSource properties, it works fine, but I would rather use the UserForm1_Initialize event so I can change the RowSource depending on which worksheet is active. Any guidance would be appreciated. |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
RowSource
Thanks! Got it....
"JLGWhiz" wrote: Try this: Me.listbox1.RowSource = Range("CashierList").Address. The row source must equate to A1 format. "Sam" wrote in message ... I have a named range, "CashierList" that I would like to populate a listbox/combo box when the userform is initialized. When I attempt this the code crashes with error 380 (Could not set the RowSource property. Invalid property value). If I insert the code, "Me.listbox1.RowSource = Range("CashierList")". If I hard-code the range in the list box RowSource properties, it works fine, but I would rather use the UserForm1_Initialize event so I can change the RowSource depending on which worksheet is active. Any guidance would be appreciated. . |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Set RowSource | Excel Programming | |||
RowSource as a row | Excel Programming | |||
RowSource | Excel Programming | |||
help with rowsource | Excel Programming | |||
Using IF, Then with rowsource? | Excel Programming |