Cancel Key Press Event
I think it would make more sense (as a user) to change the .style property to
fmStyleDropDownList (it won't allow new entries) and change the .matchrequired
property to true (and maybe change the .matchentry to fmMatchEntryComplete (to
help choose from the list)).
But you could use
KeyAscii= 0
(but that doesn't seem very user friendly to me.)
DZ wrote:
How can I cancel the Key Press Event in a Excel 97 Combo Box from Controls
Toolbar.
The Event Procedure is
Private Sub cboField_KeyPress(ByVal KeyAscii As MSForms.ReturnInteger)
End Sub
What I want to do is prevent the user from entering any text into the combo
box, because the combo box is for making selections only, not entering new
values.
In Access, I would use the Docmd.Cancel Event, but there should be a way to
accomplish the same thing in Excel
Thank you
--
Dave Peterson
|