| || |
Set text in a \"type/select item-style\" Combo Box
I have a combo box that lets you set the control's value by selecting an item or by typing whatever you want into it.
If I want to set the combo box's value to something that already exists as an item in the combo box, it is very easy to automate (assume that "tmpObj" is the combo box):
<font color="blue">tmpObj.Select "My Value"</font>
However, I'm having trouble with automating the other kind of input, where you have to type it in. TextBox controls have a "Set" method for this purpose, which works wonderfully, but combo boxes only seem to expose the generic "Type" method... which seems very unreliable. It usually deletes what it's typed partway through the operation, so that only the latter portion of the string remains in the control. Any recommendations as to how I can reliably automate typing a unique value into a combo box?
Re: Set text in a \"type/select item-style\" Combo Box
Heh... I figured out a way just after posting this:
<font color="blue">tmpObj.Object.Text = "My value"</font>
This bypasses the wrapper object and allows me to directly assign to the control's "Text" property.