Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Refering to 2nd Column in a Combobox
When using a Combobox with more than 1 CoumnCounts :
If i use the "ComboBox2.Value" line i get the Value in Column 1 How do i refer to the 2nd Column ? Combobox2(Column(2).Value ?? Corey.... |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Refering to 2nd Column in a Combobox
MsgBox ComboBox2.List(2, 1)
will give the 3rd row, 2nd column (since the base is 0) of ComboBox2. ComboBox2.Value would give you the value in the BoundColumn of the selected row. Hth, Merjet |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Refering to 2nd Column in a Combobox
So how do i get the Value in the 2nd column not the boundcolumn?
The MsgBox ComboBox2.List(2, 1) sems to give me a irrellevant value?? "merjet" wrote in message oups.com... MsgBox ComboBox2.List(2, 1) will give the 3rd row, 2nd column (since the base is 0) of ComboBox2. ComboBox2.Value would give you the value in the BoundColumn of the selected row. Hth, Merjet |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Refering to 2nd Column in a Combobox
Corey,
I checked what I wrote in #2 and it was accurate. I can't see what you do to get your results. If you want to send an Excel file to my e-mail address, maybe with some guidance on how to replicate what you are doing, I will take a look. Merjet |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
Refering to 2nd Column in a Combobox
So if i have 2 columns in Combobox2 and the Values Chosen(Displayed) was:
ALPHABET SOUP On a msg & Combobox2.value would display ALPHABET If i wanted to display BOTH values i would do what: Msg & Combobox2.value & Combobox2.(List2,1) To show : ALPHABET SOUP in the MSG??? "merjet" wrote in message oups.com... Corey, I checked what I wrote in #2 and it was accurate. I can't see what you do to get your results. If you want to send an Excel file to my e-mail address, maybe with some guidance on how to replicate what you are doing, I will take a look. Merjet |
#6
Posted to microsoft.public.excel.programming
|
|||
|
|||
Refering to 2nd Column in a Combobox
Either of these should work:
1. MsgBox ComboBox2.Value & " " & ComboBox2.List(ListIndex, 1) if BoundColumn = 1 and ALPHABET in selected row 2. MsgBox ComboBox2.List(2,0) & " " & ComboBox2.List(2, 1) if ALPHABET in the 3rd row (2nd since counting starts with 0) Merjet |
#7
Posted to microsoft.public.excel.programming
|
|||
|
|||
Refering to 2nd Column in a Combobox
I have the BoundColumn =2
ColumnCount=2 And ALPHABET is on the LEFT SIde of the Combobox. I still seem to get illogical numerical values in the other value in the msg. Whe ALPHABET SOUP I get ALPHABET 13 ?? Using : MsgBox & ComboBox2.Value & " " & ComboBox2.List(2, 0) "merjet" wrote in message oups.com... Either of these should work: 1. MsgBox ComboBox2.Value & " " & ComboBox2.List(ListIndex, 1) if BoundColumn = 1 and ALPHABET in selected row 2. MsgBox ComboBox2.List(2,0) & " " & ComboBox2.List(2, 1) if ALPHABET in the 3rd row (2nd since counting starts with 0) Merjet |
#8
Posted to microsoft.public.excel.programming
|
|||
|
|||
Refering to 2nd Column in a Combobox
sVal1 = "": sVal2="" With Combobox2 if .ListIndex < -1 then sVal2 = .List(.ListIndex,1) sVal1 = .List(.Listindex,0) end if End With msgbox sVal1 & " " & sVal2 -- Regards, Tom Ogilvy "Corey" wrote in message ... I have the BoundColumn =2 ColumnCount=2 And ALPHABET is on the LEFT SIde of the Combobox. I still seem to get illogical numerical values in the other value in the msg. Whe ALPHABET SOUP I get ALPHABET 13 ?? Using : MsgBox & ComboBox2.Value & " " & ComboBox2.List(2, 0) "merjet" wrote in message oups.com... Either of these should work: 1. MsgBox ComboBox2.Value & " " & ComboBox2.List(ListIndex, 1) if BoundColumn = 1 and ALPHABET in selected row 2. MsgBox ComboBox2.List(2,0) & " " & ComboBox2.List(2, 1) if ALPHABET in the 3rd row (2nd since counting starts with 0) Merjet |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Add 2nd Column to ComboBox | Excel Programming | |||
How do I add 1 column, refering to another column | Excel Discussion (Misc queries) | |||
Multiple column Combobox | Excel Programming | |||
How to get the values using a condition refering to the other column | Excel Worksheet Functions | |||
Multi Column ComboBox | Excel Programming |