Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default ascii key value

Hello,

I am designing an application in VBA which will utilize userforms as
data entry interfaces. For the ease of use, I have decided on utilize
KeyDown event in some of the textbox controls, in order to
automatically format the text. For instance, a typed numbers for a
phone number 8001113333 will automatically render it to be 800 111
3333. I understand that I could very easily use the "format" method
to achieve the same. However this way each character gets formatted
before the change is actually made. My only problem is such that the
KeyCode argument of the KeyDown event returns values of 48 through 57
for the keys above the letters, but 96 through 105 for the numlock
keys. Unfortunately the latter ones correspond to letters instead.

Could someone point me in the right direction, please? I'm not sure
how to approach this issue.

Thank you,
Mark
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default ascii key value

On Dec 24, 6:40*pm, maroosh wrote:
Hello,

I am designing an application in VBA which will utilize userforms as
data entry interfaces. *For the ease of use, I have decided on utilize
KeyDown event in some of the textbox controls, in order to
automatically format the text. *For instance, a typed numbers for a
phone number 8001113333 will automatically render it to be 800 111
3333. *I understand that I could very easily use the "format" method
to achieve the same. *However this way each character gets formatted
before the change is actually made. *My only problem is such that the
KeyCode argument of the KeyDown event returns values of 48 through 57
for the keys above the letters, but 96 through 105 for the numlock
keys. *Unfortunately the latter ones correspond to letters instead.

Could someone point me in the right direction, please? *I'm not sure
how to approach this issue.

Thank you,
Mark


Please disregard. There couldn't be an easier solution. I guess I
just got a little bit too tired. :)

Best regards,
Mark

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
CSV to ASCII Quco Excel Discussion (Misc queries) 5 April 4th 23 10:30 AM
VBA - Hex To ASCII ajocius[_58_] Excel Programming 3 May 22nd 06 04:14 PM
ASCII format jimbob Excel Discussion (Misc queries) 1 March 18th 06 01:24 PM
Ascii Syrus the Virus[_11_] Excel Programming 4 February 3rd 04 02:59 PM
ASCII value Terence Excel Programming 2 October 2nd 03 03:41 AM


All times are GMT +1. The time now is 07:00 AM.

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"