LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 28
Default Keystroke identification

I have a userform and a textbox. Code is as follows:

Option Explicit
Private Sub TextBox1_KeyPress(ByVal KeyAscii As MSForms.ReturnInteger)
' MsgBox KeyAscii & Chr(KeyAscii)
End Sub
Private Sub TextBox1_KeyUp(ByVal KeyCode As MSForms.ReturnInteger,
ByVal Shift As Integer)
MsgBox KeyCode & Chr(KeyCode) & Shift
End Sub

The help documentation indicates that _KeyPress should be used to
interpret keystrokes, but that _KeyUp or _KeyDown should be used to
identify non-printable keys such as <Page Up or <Insert. How do
people normally interpret keys when you need more definition than ANSI
definition allows? Are the KeyCodes in _KeyUp keyboard specific?

 
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
Identification of what day it is [email protected] Excel Worksheet Functions 5 March 8th 08 07:47 PM
Currency identification Balaji Excel Discussion (Misc queries) 2 August 18th 07 07:38 AM
Chart identification Dr.Schwartz Excel Programming 1 September 10th 04 01:00 PM
checkbox identification devin Excel Programming 0 January 21st 04 04:15 PM
checkbox identification devin Excel Programming 1 January 14th 04 04:19 PM


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

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

About Us

"It's about Microsoft Excel"