Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Prevent "standard" key event in userform
Hi Oskar
If you trap things in the Keydown and/or KeyUp events, set the KeyCode to 0 (zero) while doing it to prevent the default app action. Same thing goes for KeyAscii in the KeyPress evens. Private Sub ComboBox1_KeyDown(ByVal KeyCode As MSForms.ReturnInteger, ByVal Shift As Integer) If KeyCode = 34 Then KeyCode = 0 MsgBox "Zoot allures" End If End Sub Couldn't find any "PgDn in Userform" so this is very general. HTH. Best wishes Harald "Oskar" skrev i melding ... In found out (see "PgDn in Userform") how to capture the pressing of PgDn with keypressed and try to use it to read the next record into the form. Unfortunately, the "standard event" is executed too. I.e. PgDn in a combo box get the new record (fine) but also changes the value of the combo box (not fine). Any way to prevent this? Oskar P.S. I don't know if starting a new thread is a correct procedure to draw (renewed) attention to an old thread. If not, I would like some illumination. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
How to use "standard deviation" option in Y error bar menu? | Charts and Charting in Excel | |||
Excel - Golf - how to display "-2" as "2 Under" or "4"as "+4" or "4 Over" in a calculation cell | Excel Discussion (Misc queries) | |||
change "true" and "false" to "availble" and "out of stock" | Excel Worksheet Functions | |||
In Excel 2003 is there a way to prevent "Save As" and "Print"? | Excel Discussion (Misc queries) | |||
Standard font in a "New Microsoft Excel Worksheet.xls" wont change | Excel Discussion (Misc queries) |