Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 16
Default keydown event

I'm trying to create a custom calculator on a userform.
Im using the keydown event in a textbox to capture
operators from the num pad on the keyboard.

everything works fine except the text value of the
operator is added to the textbox. Of course I dont want
this to happen. I have tried Onkey method to associate a
kestroke to a procedure with no sucess

application.onkey "+", "Macro"

Does anyone know how to accomplish this or do I need to be
more specific on what Im trying to do.

TIA
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 16
Default keydown event

I got lucky in a search and found what I was looking for
in a post reply from Ron de Bruin...

in the keypress event I added: KeyAscii = 0
after the sub I wanted executed. It seems to work now.
Thank You...

-----Original Message-----
I'm trying to create a custom calculator on a userform.
Im using the keydown event in a textbox to capture
operators from the num pad on the keyboard.

everything works fine except the text value of the
operator is added to the textbox. Of course I dont want
this to happen. I have tried Onkey method to associate a
kestroke to a procedure with no sucess

application.onkey "+", "Macro"

Does anyone know how to accomplish this or do I need to

be
more specific on what Im trying to do.

TIA
.

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
event vba irosh Excel Worksheet Functions 4 November 11th 08 09:25 AM
VBA Event Steve Excel Discussion (Misc queries) 2 October 14th 08 11:04 PM
event marker68 Excel Discussion (Misc queries) 1 April 4th 08 02:38 PM
KeyDown event on form Horatio J. Bilge, Jr. Excel Discussion (Misc queries) 0 October 26th 07 03:30 PM
OnTime event not firing in Workbook_Open event procedure GingerTommy Excel Programming 0 September 24th 03 03:18 PM


All times are GMT +1. The time now is 01:47 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"