Solved

Redirecting Key Events

Posted on 1998-10-19
3
126 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 

Author Comment

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

Accepted Solution

by:
TheAnswerMan earned 200 total points
ID: 1440690
sub TextBox_Keypress(keyascii as integer)

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

Expert Comment

by:TheAnswerMan
ID: 1440691
oops.. do this instead
sub TextBox_Keypress(keyascii as integer)

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

Featured Post

Revamp Your Training Process

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

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 …
Most everyone who has done any programming in VB6 knows that you can do something in code like Debug.Print MyVar and that when the program runs from the IDE, the value of MyVar will be displayed in the Immediate Window. Less well known is Debug.Asse…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…

695 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