Article ID: 168604
Article Last Modified on 10/11/2006
Private Sub ComboBox1_DropButtonClick()
'<code goes here>
End Sub
The DropButtonClick event for a combo box is triggered whenever the list
for the combo box appears or disappears. If the subroutine assigned to this
event uses the List property to reset the list for the combo box, you will
receive an error message when you run the UserForm and click the combo box.
For example:
Private Sub ComboBox1_DropButtonClick()
Dim ListArray(0 To 3) As String
ListArray(0) = Now
ListArray(1) = Now + 0.25
ListArray(2) = Now + 0.5
ListArray(3) = Now + 1
ComboBox1.List = ListArray
End Sub
It is recommended that you do not use this method to reset the list for a
combo box in Microsoft Excel 97. Instead, reset the list when you display
the UserForm, or when you click another control in the UserForm, such as a
command button.
Additional query words: 97 XL97 combobox dropdown list box
Keywords: kberrmsg kbhowto kbprb kbui KB168604