PC Review


Reply
Thread Tools Rate Thread

ascii key value

 
 
maroosh
Guest
Posts: n/a
 
      24th Dec 2009
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
 
Reply With Quote
 
 
 
 
maroosh
Guest
Posts: n/a
 
      25th Dec 2009
On Dec 24, 6:40*pm, maroosh <maru...@hotmail.com> 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 With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
ASCII Help mattc66 via AccessMonster.com Microsoft Access Queries 3 18th Oct 2006 06:32 AM
how to convert non-ISO extended-ASCII to ISO ascii dotNeter Microsoft Dot NET 1 29th Jun 2006 06:53 PM
How can I convert high ASCII to low ASCII Friso Wiskerke Microsoft VB .NET 6 7th Jan 2005 05:52 PM
DOS ASCII Code vs Windows ASCII Code??? Daniel Olivares Microsoft Windows 2000 Developer 0 6th Apr 2004 11:02 PM
Re: ASCII Low Values (Ascii 0) to a string Manfred Suttorp Microsoft Dot NET Framework 2 25th Jul 2003 02:18 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 11:05 AM.