Solved

Redirecting Key Events

Posted on 1998-10-19
3
116 Views
Last Modified: 2010-04-30
How can I capture a key event and redirect it?  I want to capture the "+" vbKeyAdd and excute the <tab> instead, without changing the text property of the textbox.
0
Comment
Question by:whitej8
  • 2
3 Comments
 

Author Comment

by:whitej8
Comment Utility
I do not want the "+" to appear in the textbox.
0
 
LVL 3

Accepted Solution

by:
TheAnswerMan earned 200 total points
Comment Utility
sub TextBox_Keypress(keyascii as integer)

if keyascii = 43 then
  '+ Pressed
  sendkeys(vbtab)
end if
0
 
LVL 3

Expert Comment

by:TheAnswerMan
Comment Utility
oops.. do this instead
sub TextBox_Keypress(keyascii as integer)

if keyascii = 43 then
  '+ Pressed
  keyascii = 0
  sendkeys(vbtab)
end if
0

Featured Post

Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

Join & Write a Comment

Introduction In a recent article (http://www.experts-exchange.com/A_7811-A-Better-Concatenate-Function.html) for the Excel community, I showed an improved version of the Excel Concatenate() function.  While writing that article I realized that no o…
Have you ever wanted to restrict the users input in a textbox to numbers, and while doing that make sure that they can't 'cheat' by pasting in non-numeric text? Of course you can do that with code you write yourself but it's tedious and error-prone …
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

744 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now