Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Could not set the Text property of a ComboBox on User Form.
What is combo box's .Style set to ?
If it is 2-List, change to 0-Combo. NickhK "??????? ?. ???????" wrote in message ... The statement ComboBox1.Text = "1,2,3" yields to a run-time error. The ComboBox1.MatchEntry is fmMatchEntryNone, and ComboBox1.MatchRequired is False . The "1,2,3" does not match any entry in the ComboBox1 at the time, but I want to show it in the edit field of the combo box. |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Could not set the Text property of a ComboBox on User Form.
Yes, that means you cannot set .Text to a value that is not in the list.
NickHK "??????? ?. ???????" wrote in message ... ComboBox1.Style equals to fmStyleDropDownList "NickHK" ?????: What is combo box's .Style set to ? If it is 2-List, change to 0-Combo. NickhK "??????? ?. ???????" wrote in message ... The statement ComboBox1.Text = "1,2,3" yields to a run-time error. The ComboBox1.MatchEntry is fmMatchEntryNone, and ComboBox1.MatchRequired is False . The "1,2,3" does not match any entry in the ComboBox1 at the time, but I want to show it in the edit field of the combo box. |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Could not set the Text property of a ComboBox on User Form.
Well this code errors as expected in my version of Excel 2002 :
Private Sub UserForm_Initialize() With ComboBox1 .Style = fmStyleDropDownList .AddItem "Item 1" .AddItem "Item 2" .AddItem "Item 3" .AddItem "Item 4" .Text = "Not in list" End With End Sub but this not not : Private Sub UserForm_Initialize() With ComboBox1 .Style = fmStyleDropDownCombo .AddItem "Item 1" .AddItem "Item 2" .AddItem "Item 3" .AddItem "Item 4" .Text = "Not in list" End With End Sub Read the help on the .Style property. NickHK "??????? ?. ???????" wrote in message ... Why? The ComboBox1.MatchEntry is fmMatchEntryNone, and ComboBox1.MatchRequired is False. And it works fine in the Office 2002. And what You do suggest? "NickHK" ?????: Yes, that means you cannot set .Text to a value that is not in the list. NickHK "??????? ?. ???????" wrote in message ... ComboBox1.Style equals to fmStyleDropDownList "NickHK" ?????: What is combo box's .Style set to ? If it is 2-List, change to 0-Combo. NickhK "??????? ?. ???????" wrote in message ... The statement ComboBox1.Text = "1,2,3" yields to a run-time error. The ComboBox1.MatchEntry is fmMatchEntryNone, and ComboBox1.MatchRequired is False . The "1,2,3" does not match any entry in the ComboBox1 at the time, but I want to show it in the edit field of the combo box. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Could not set the Text property of a ComboBox on User Form. | Excel Programming | |||
use of mouse track wheel on user form combobox... | Excel Programming | |||
Cont' Value and Text Property of Combobox | Excel Programming | |||
Do combobox allow user to enter text? | Excel Programming | |||
User Form-error 1004 unless opened in sheet w/combobox data | Excel Programming |