View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
DZ DZ is offline
external usenet poster
 
Posts: 29
Default Cancel Key Press Event

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