I have 3 applications open with the main one running. When an event occurs in the main application it opens Excel with its' own built in command line to open Excel.
Excel opens a file in the XLSTART folder that has an Auto_Open macro in it.
The file opens and the macro runs and toggles back and forth between the other 2 open applications using SendKeys commands to enter instructions and data into both the open applications.
However, when I sometimes toggle back into one of the open applications the focus is not the same as when I toggled out of the application.
By that I mean the cursor is not where it was when I toggled out of the application.
I have been using the TaskIDNum1[2] = Shell("C:\Program Files\Application1Folder\Application1FileName.exe",1) format to toggle back and forth between applications but I want to try and use the AppActivate Statement.
I don't want to use the "AppActivate (Task ID Number, False)" format since this involves an extra step to retrieve the Task ID numbers of the open applications, because they are already both running and I am not opening them.
I have tried every imaginable AppActivate programming format but nothing will work and I keep getting this compiling error "Expected: = "
I am looking for a format as such: AppActivate ("C:\Program Files\Application Folder\ApplicationName.exe", False)
I must be missing something in the syntax and all examples of the AppActivate Statement show the use of the AppActivate(Task ID number,[True][False]) format which I don't want to use.
I have Microsoft Office 2003 and Windows XP - Home Edition.
Bookmarks