SendKeys "^N" not working, why?

Posted on 2003-02-23
Medium Priority
Last Modified: 2010-05-18
I have the following snippet (simplified) VB6 SP5 code:

Call TimeDelay(5, True)
SendKeys "^n"  

Now I do the following:
1. Run the above code.
2. Quickly manually activate my Word app.
3. Wait for the delay to run out and it opens a new Word window just like it should with a "Ctrl-n"

The problem is that this same approach does not work in another app called TradeStation.  TradeStation accepts the CTRL-N if I manually hit the keys on the keyboard, but won't take it from Sendkeys.

Any ideas on why SendKeys works on Word but not on TradeStation? Any fixes?

I've already tried:
SendKeys "^N"  
Question by:deming
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

Accepted Solution

JohnMcCann earned 400 total points
ID: 8006219

Author Comment

ID: 8013817
Thank you for an excellent solution.

Featured Post

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

Question has a verified solution.

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

Background What I'm presenting in this article is the result of 2 conditions in my work area: We have a SQL Server production environment but no development or test environment; andWe have an MS Access front end using tables in SQL Server but we a…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
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…
Suggested Courses

764 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