S
Stefan Mueller
I've a UserForm with a ComboBox with e.g. 10 items.
Private Sub UserForm_Initialize()
Dim Counter As Long
For Counter = 1 To 10
ComboBox1.AddItem "MyItem " & Counter
Next
ComboBox1.ListIndex = 5
End Sub
Choose another item in the ComboBox. Now, if you press 'Esc' the
before selected item gets selected (and there is also no KeyPress
event if you press 'Esc' the first time).
How can I disable this feature? I don't want that 'Esc' selects the
before selected item. I like e.g. 'Esc' to close the UserForm.
Private Sub UserForm_Initialize()
Dim Counter As Long
For Counter = 1 To 10
ComboBox1.AddItem "MyItem " & Counter
Next
ComboBox1.ListIndex = 5
End Sub
Choose another item in the ComboBox. Now, if you press 'Esc' the
before selected item gets selected (and there is also no KeyPress
event if you press 'Esc' the first time).
How can I disable this feature? I don't want that 'Esc' selects the
before selected item. I like e.g. 'Esc' to close the UserForm.