• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 295
  • Last Modified:

SendKeys "^N" not working, why?

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"  
0
deming
Asked:
deming
1 Solution
 
JohnMcCannCommented:
0
 
demingAuthor Commented:
Thank you for an excellent solution.
0

Featured Post

Get expert help—faster!

Need expert help—fast? Use the Help Bell for personalized assistance getting answers to your important questions.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now