Select a value from a combobox drop down list through code

G

Guest

I am copying a value from a spreadsheet cell to a combobox
FormInput.ComboBoxRim1.Text = Range("d17"); text in d17 is Bo
The text Bob appears in the combobox correctly but the cursor location is on a blank space to the right of b thus Bob is not found in the dropdown list
If I enter the combobox manually and backspace so the cursor is on top of b then all other code works properly

Is there any way to paste from a spreadsheet to a combobox form and have the text recognize that it is contained in the list array

Terr
 
B

Bob Phillips

Terry,

How about

FormInput.ComboBoxRim1.AddItem Range("d17")


--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)

TerryK said:
I am copying a value from a spreadsheet cell to a combobox.
FormInput.ComboBoxRim1.Text = Range("d17"); text in d17 is Bob
The text Bob appears in the combobox correctly but the cursor location is
on a blank space to the right of b thus Bob is not found in the dropdown
list.
If I enter the combobox manually and backspace so the cursor is on top
of b then all other code works properly.
Is there any way to paste from a spreadsheet to a combobox form and have
the text recognize that it is contained in the list array?
 
G

Guest

Bob,
Thanks for the quick reply. A good suggestion but it was not successful. I am populating the combobox list with an array.
I suppose I could redim the arrays but there are quite a few of them.
I will keep looking for more ideas.

Terry
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top