Automation in Access 97 (I chanlenge you!)

chris_visible

Registered User.
Local time
Today, 18:19
Joined
Jan 17, 2002
Messages
24
When automating Excel using Access 97 I can only seem to run commands in one Excel application in a procedure. I use the function:
AppActivate ("Microsoft Excel - 'bookname'")
to change the application in the taskbar that is being automated but Access continues to automate the first application activated.

Is there another way of activating an aplication for automation.

Thanks very much to anybody able to help.
 
The Shell statement under AppActivate help gives instructions on storing the window handle in a variable so you can activate the specific window.

Copied from SHELL HELP;

Remarks

If the Shell function successfully executes the named file, it returns the task ID of the started program. The task ID is a unique number that identifies the running program. If the Shell function can't start the named program, an error occurs. If you use the MacID function with Shell in Microsoft Windows, an error occurs.

Note The Shell function runs other programs asynchronously. This means that a program started with Shell might not finish executing before the statements following the Shell function are executed.
 
Thanks for the suggestion

I have used Shell to activate the application but this also opens a new excel application which I don't want.

I would like to know if it possible to activate a new application without opening a new window?

Has anybody else experienced this problem? Let me know.
 
Now I do not understand what you are trying to achieve - I thought you had a couple of programs open and wished to toggle between them.

Now I get the impression you wish to control the open application to open different files is this correct? Before I delve any further.
 

Users who are viewing this thread

Back
Top Bottom