

| Type | Description | |||
| Variant | A Variant expression that indicates the selected value. |
The following VB samples are equivalents:
With ComboBox1
.Select(.SearchColumnIndex) = "Child 2"
End Withand
With ComboBox1
.Value = "Child 2"
End WithThe following VB sample selects the "Root" item:
With ComboBox1
.BeginUpdate
.HeaderVisible = False
.ColumnAutoResize = True
.Columns.Add "Column 1"
With .Items
.InsertItem .AddItem("Root"), , "Child"
End With
.Value = "Root"
.EndUpdate
End WithThe following C++ sample selects the "Child 2" item:
m_combobox.SetValue( COleVariant( "Child 2" ) );
The following VB.NET sample selects the "Child 2" item:
With AxComboBox1
.Value = "Child 2"
End WithThe following C# sample selects the "Child 2" item:
axComboBox1.Value = "Child 2";
The following VFP sample selects the "Child 2" item:
with thisform.ComboBox1 .Object.Value = "Child 2" endwith