Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
listbox
how to fill a listbox with one m x n range values?
thanks, Emiliano |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
listbox
You must enter Design Mode to add Ranges. When you first Add a listbox you
are in design Mode automatically and you can right click on the Listbox to add ranges by Right Click on Listbox - Properties - ListFillRange. Enter something like A1:A10. to Add a Listbox or change ListFillRange do the following 1) Use toolbar "Control Toolbox". If you don't have one then go to View Menu - Toolbars and select "Control Toolbox" 2) Pressing the triangle on the Toolbar toggles between Normal Mode and Design Mode. Enter Design Mode 3) Right Click Listbox and Select Properties. If you can't do this then you are not in Design Mode. Click the triangle again 4) ListFillRange. Enter something like A1:A10. 5) Press Triangle again to exit Design Mode. "eggpap" wrote: how to fill a listbox with one m x n range values? thanks, Emiliano |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
listbox
Sorry Joes,
I think to have been not clear in my request. I referred to the listbox control on an user form. Thanks, Emiliano |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
listbox
You can do it two ways.
1) Manual - go to the VBA menu and view properties window and in RowSource box add something like sheet1!A1:A10 2) From code. It is similar to the manual mode. Listbox1.RowSounce = "sheet1!A1:A10" "eggpap" wrote: Sorry Joes, I think to have been not clear in my request. I referred to the listbox control on an user form. Thanks, Emiliano |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
listbox
I followed your tip but I get
a message similar to the following: Impossible to set the rowsource property. Property value is not valid. Emiliano |
#6
Posted to microsoft.public.excel.programming
|
|||
|
|||
listbox
try doing it manually 1st until you get the format correct. Makesure the
Properties window shows the name of the Listbox when you add the RowSource. don't use double quotes when you put the sheet name and cell range into the RowSource box. The try it from code. for testing you can read the setting by using a msgbox msgbox("Source = " & userform1.listbox1.RowSource) Make sure the names of the userform and listbox are the same as your code. "eggpap" wrote: I followed your tip but I get a message similar to the following: Impossible to set the rowsource property. Property value is not valid. Emiliano |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
userform listbox cannot get listbox.value to transfer back to main sub | Excel Programming | |||
avoiding duplicates in listbox (added from another listbox) | Excel Programming | |||
VBA: Creating listbox similar to the one in Pivot table (Listbox+Checkbox) | Excel Programming | |||
listbox.value not equal to listbox.list(listbox.listindex,0) | Excel Programming | |||
Is refreshing listbox rowsource in listbox click event possible? | Excel Programming |