Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
list box help
I am using a list box from the forms toolbar. This is new for me. I
loaded 10 numbers of 4 digits. The output is numbers 1 to 10. I would rather it output the 4 digit numbers instead. It looks like this is not an option. Are there any good links on the list box? I have found many of the bad ones. |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
list box help
Don't use a CellLink (assuming that is what you are currently doing);
rather, assign the ListBox to use this macro instead... Sub AssignListItemToCell() With Worksheets("Sheet1").Shapes("List Box 1").OLEFormat.Object Range("A1").Value = .List(.ListIndex) End With End Sub Change the worksheet reference ("Sheet1" in my example code), List Box name ("List Box 1" in my example code) and the receiving Cell (A1 in my example code) to suit your actual conditions. -- Rick (MVP - Excel) "Fan924" wrote in message ... I am using a list box from the forms toolbar. This is new for me. I loaded 10 numbers of 4 digits. The output is numbers 1 to 10. I would rather it output the 4 digit numbers instead. It looks like this is not an option. Are there any good links on the list box? I have found many of the bad ones. |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
list box help
Here is one place:
http://office.microsoft.com/en-us/ex...6811033.aspx#1 It sounds like you were returning the list index number instead of the list index value. Also, you might find the ListBox from the Control Toolbox more flexible to work with, since you can access all of the properties through a Properties dialog box. VBA help files also cotain more information on the OLEObject actveX ListBox than the ones from the Forms toolbar. "Fan924" wrote in message ... I am using a list box from the forms toolbar. This is new for me. I loaded 10 numbers of 4 digits. The output is numbers 1 to 10. I would rather it output the 4 digit numbers instead. It looks like this is not an option. Are there any good links on the list box? I have found many of the bad ones. |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
list box help
You could replace the Listbox from the Forms toolbar with a listbox from the
Control toolbox toolbar. That will have the behavior that you want (the linked cell will show the displayed choice). But you could use the listbox from the Forms toolbar and a couple of cells--one cell for the link and one cell showing the value... For instance, if your list is on a sheet (say Sheet99 in A1:A10) and your linked cell is on sheet1 in A1, you could use: =if(a1=0,"",index(sheet99!a1:a10,a1)) The linked cell returns an index (1 to how many entries) into the listbox's list. I don't know of any links for the listbox, good or bad. Fan924 wrote: I am using a list box from the forms toolbar. This is new for me. I loaded 10 numbers of 4 digits. The output is numbers 1 to 10. I would rather it output the 4 digit numbers instead. It looks like this is not an option. Are there any good links on the list box? I have found many of the bad ones. -- Dave Peterson |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
list box help
Thanks guys............
|
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Use VBA to reset data validation (=list) value to first value in that list (list is a named range) | Excel Programming | |||
Compare List A to List B, Return List B Items Not in List A | Excel Programming | |||
validation list--list depends on the selection of first list | New Users to Excel | |||
list 1 has 400 names List 2 has 4000. find manes from list 1 on 2 | Excel Worksheet Functions | |||
find names on list 1 in list 2. list 1 4000 names list 2 400 name | Excel Worksheet Functions |