Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,327
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to use "standard deviation" option in Y error bar menu? Michael Levin Charts and Charting in Excel 1 April 24th 10 01:35 AM
Excel - Golf - how to display "-2" as "2 Under" or "4"as "+4" or "4 Over" in a calculation cell Steve Kay Excel Discussion (Misc queries) 2 August 8th 08 01:54 AM
change "true" and "false" to "availble" and "out of stock" inthestands Excel Worksheet Functions 2 July 19th 07 07:05 PM
In Excel 2003 is there a way to prevent "Save As" and "Print"? lucky2000 Excel Discussion (Misc queries) 3 April 26th 07 02:49 PM
Standard font in a "New Microsoft Excel Worksheet.xls" wont change Prunetart Excel Discussion (Misc queries) 0 September 15th 06 10:36 AM


All times are GMT +1. The time now is 04:04 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"