Solved

Redirecting Key Events

Posted on 1998-10-19
3
120 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
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

Best Practices: Disaster Recovery Testing

Besides backup, any IT division should have a disaster recovery plan. You will find a few tips below relating to the development of such a plan and to what issues one should pay special attention in the course of backup planning.

Question has a verified solution.

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

I’ve seen a number of people looking for examples of how to access web services from VB6.  I’ve been using a test harness I built in VB6 (using many resources I found online) that I use for small projects to work out how to communicate with web serv…
The debugging module of the VB 6 IDE can be accessed by way of the Debug menu item. That menu item can normally be found in the IDE's main menu line as shown in this picture.   There is also a companion Debug Toolbar that looks like the followin…
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…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

809 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