Hi, this code isn't working:
How to do it or something like:ActiveCell.Offset(0, i).Text = ComboBox1.ListIndex(i).Text
Ie, how to show a specific item in a combobox.combobox1.text = Combobox1.item(i).text
if the combobox contains a 1-dimensional array and you want to get the 3rd item:
ActiveCell.Offset(, 1) = ComboBox1.List(2)
if the combobox contains a mulidimensional array and you want to get the 3rd item in the first column:
ActiveCell.Offset(, 1) = ComboBox1.List(2,1)
Last edited by snb; 09-01-2011 at 03:09 PM.
To get the value from the Combobox, which is what it looks like you want to do because you are trying to assign it to a cell, you need the List property, not the ListIndex property.
To "pick" an item in the combobox, you use ListIndex.ActiveCell.Offset(0, i).Text = ComboBox1.List(i)
ComboBox1.ListIndex = 3
Last edited by Colin Legg; 09-01-2011 at 01:05 PM.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks