-
Value of Multi column combobox
I have a multi combobox that lists Surname, Initials and Title from three columns on a worksheet. However, only the value of the first column, "Surname", is given when I read the value. Is it possible to access the values of all the columns simultaneously? If so, how is it done?
All assistancae appreciated.
Regards
Zagrijs
-
Try..[VBA]ListBox1.List(ListBox1.ListIndex, 1)
ListBox1.List(ListBox1.ListIndex, 2)[/VBA]
-
Set the .BoundColumn property of the ComboBox to 1 and the .TextColumn property to 2.
Then [vba]MsgBox ComboBox1.Text & " " & ComboBox1.Value[/vba] will give the person's surname and initials.
For more than two columns, Macrosian's approach of accessing both dimensions of the .List property is needed.
-
Thanks. The help is appreciated
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules