Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Extracting choice from a ListBox
This is my first post. When using a ListBox with the "Option" style (as opposed to "Plain"), how do you write the code to test for which item was selected, so that it can be used in another part of the subroutine or module? Thanks! - Dave -- davey ------------------------------------------------------------------------ davey's Profile: http://www.excelforum.com/member.php...o&userid=24340 View this thread: http://www.excelforum.com/showthread...hreadid=379411 |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Extracting choice from a ListBox
Listbox1.Value just the same.
-- HTH Bob Phillips "davey" wrote in message ... This is my first post. When using a ListBox with the "Option" style (as opposed to "Plain"), how do you write the code to test for which item was selected, so that it can be used in another part of the subroutine or module? Thanks! - Dave -- davey ------------------------------------------------------------------------ davey's Profile: http://www.excelforum.com/member.php...o&userid=24340 View this thread: http://www.excelforum.com/showthread...hreadid=379411 |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Extracting choice from a ListBox
Hi,
Add code similar to this to your userform: Private Sub ListBox1_Click() Worksheets("Sheet1").Range("a1")=ListBox1.value ' Assign data to cell a1 in Sheet1 End Sub HTH "davey" wrote: This is my first post. When using a ListBox with the "Option" style (as opposed to "Plain"), how do you write the code to test for which item was selected, so that it can be used in another part of the subroutine or module? Thanks! - Dave -- davey ------------------------------------------------------------------------ davey's Profile: http://www.excelforum.com/member.php...o&userid=24340 View this thread: http://www.excelforum.com/showthread...hreadid=379411 |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Extracting choice from a ListBox
Hi again, I didn't see the Forum Search button before submitting the origina post about extracting data from a listbox. I found it, then did a search, and found a post by Harald Staff o 6-08-05 that gave me the help I needed, in a thread called "Choosin Items in a Listbox". This is great! - Dave -- dave ----------------------------------------------------------------------- davey's Profile: http://www.excelforum.com/member.php...fo&userid=2434 View this thread: http://www.excelforum.com/showthread.php?threadid=37941 |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
Extracting choice from a ListBox
Thank You Bob & Toppers! Those are very helpful, and seem eve easier. - Dave -- dave ----------------------------------------------------------------------- davey's Profile: http://www.excelforum.com/member.php...fo&userid=2434 View this thread: http://www.excelforum.com/showthread.php?threadid=37941 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
listbox B conditional of input in Listbox A | Excel Discussion (Misc queries) | |||
Hiding rows based on choice in a listbox | Excel Discussion (Misc queries) | |||
Multicolumn Listbox and ordinary listbox | 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 |