Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 238
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,934
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,565
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 238
Default list box help

Thanks guys............
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Use VBA to reset data validation (=list) value to first value in that list (list is a named range) ker_01 Excel Programming 7 October 27th 08 03:13 PM
Compare List A to List B, Return List B Items Not in List A zwestbrook Excel Programming 4 September 18th 08 10:32 PM
validation list--list depends on the selection of first list Michael New Users to Excel 2 April 27th 06 10:23 PM
list 1 has 400 names List 2 has 4000. find manes from list 1 on 2 Ed Excel Worksheet Functions 5 September 12th 05 09:48 AM
find names on list 1 in list 2. list 1 4000 names list 2 400 name Ed Excel Worksheet Functions 1 September 4th 05 12:48 AM


All times are GMT +1. The time now is 05:50 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"