HOW TO
The UIComboBoxControl has an Enabled event which can be set to True or False.
Code:
Private Function UIComboBoxControl1_Enabled() As Boolean
UIComboBoxControl1_Enabled = False
End Function
Code:
Option Explicit
Dim bSwitch As Boolean
Private Sub UIButtonControl1_Click()
If bSwitch = True Then
bSwitch = False
Else
bSwitch = True
End If
End Sub
Private Function UIComboBoxControl1_Enabled() As Boolean
UIComboBoxControl1_Enabled = bSwitch
End Function
Code:
Private Function MxDocument_NewDocument() As Boolean
bSwitch = True
End Function
Private Function MxDocument_OpenDocument() As Boolean
bSwitch = False
End Function
Private Function UIComboBoxControl1_Enabled() As Boolean
UIComboBoxControl1_Enabled = bSwitch
End Function
Note:
The variable in this example was named 'bSwitch' since it is a Boolean used to switch the combobox on and off. It can, however, have any name.
Article ID:000002677
Get help from ArcGIS experts
Download the Esri Support App