Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Thank you
DZ |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
how can I trap the change event (Tab Press key) of these controls | Excel Programming | |||
how can I trap the change event (Tab Press key) of these controls | Excel Programming | |||
how can I trap the change event (Tab Press key) of these controls | Excel Worksheet Functions | |||
Key Press Event | Excel Programming | |||
key press event? | Excel Programming |