In that case, you can just use the Clear method. This code snippet uses a
CommandButton to toggle the combo box between a short list and no list:
Sub CommandButton1_Click()
Set objPage = Item.GetInspector.ModifiedFormPages("P.2")
Set ComboBox1 = objPage.Controls("ComboBox1")
If ComboBox1.ListCount = 0 Then
' populate list with array
strList = "red;blue;green"
arr = Split(strList, ";")
ComboBox1.List = arr
Else
ComboBox1.Clear
End If
End Sub
TIP: To look up control syntax, add a userform to your Outlook VBA project.
The MSForms library will automatically be added to Tools | References, and
you'll be able to look up MSForms control properties and methods in the
object browser.
--
Sue Mosher, Outlook MVP
Author of
Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers