ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Select a value from a combobox drop down list through code (https://www.excelbanter.com/excel-programming/284667-select-value-combobox-drop-down-list-through-code.html)

TerryK

Select a value from a combobox drop down list through code
 
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



Bob Phillips[_6_]

Select a value from a combobox drop down list through code
 
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" wrote in message
...
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?

Terry





TerryK[_2_]

Select a value from a combobox drop down list through code
 
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


All times are GMT +1. The time now is 01:17 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com