Using VBA to control other applications (1 Viewer)

Kenny

Registered User.
Local time
Today, 12:05
Joined
Mar 1, 2002
Messages
14
I have a module controlling an application called Business Objects. Basically a report is run on Business Objects then saved as a PDF file or printed. This works perfectly, however Access remained 'Greyed out' after the application has been terminated. This usually only means clicking on a form to activate it, I have also added in a message box but this does not appear and the icon for Access on the taskbar flashes. When this is clicked on then the message box appears.

What it looks like to me is that the processor gives control the desktop as opposed to returning it to Access after BusinessObject is closed.

This is not a major problem for me however as soon as I roll this out to the users I am sure my phone will be ringing off the hook.

Is there a command to activate access without having to click on it. Any help will be greatly appreciated.
 

namliam

The Mailman - AWF VIP
Local time
Today, 13:05
Joined
Aug 11, 2003
Messages
11,695
maybe something like access.visible ? .setfocus .activate?

not sure tho... something like that....

Regards

The Mailman
 

Fuga

Registered User.
Local time
Today, 13:05
Joined
Feb 28, 2002
Messages
566
there is the

interaction.appactivate

that activates a window.

Fuga.
 

Kenny

Registered User.
Local time
Today, 12:05
Joined
Mar 1, 2002
Messages
14
Thanks Guys

I have since used the code:

Interaction.AppActivate "Microsoft Access"

and this works a treat

Cheers

Kenny
 

AshwinChandarana

New member
Local time
Today, 16:35
Joined
Feb 4, 2015
Messages
5
I have a windowless app running in the tray, and I wish to pass F11 key to it.
Sendkeys "F11" does not pass F11 to it directly.
How can I address this windowless application in 'appactivate' statement?
 

CJ_London

Super Moderator
Staff member
Local time
Today, 12:05
Joined
Feb 19, 2013
Messages
16,713
posting multiple times to old threads is unlikely to produce a result - you would be better to create a new thread with the header relevant to your question

However, I've seen your post now - take a look at this link for your answer

http://www.contextures.com/excelvbasendkeys.html
 

AshwinChandarana

New member
Local time
Today, 16:35
Joined
Feb 4, 2015
Messages
5
I think you misunderstood my question. Problem is not with sendkeys, but with appactivate. Your link explains the sendkeys only.

I am not able to address windowless app staying in the tray.
 

AshwinChandarana

New member
Local time
Today, 16:35
Joined
Feb 4, 2015
Messages
5
Thanks for the link.
Shell command starts the app from the scratch, where as my app is already running in the tray.

Appactivate statement activates any windowed app like Calculator, Notepad, etc, whereas my app is windowless having an icon in the tray. Normally, it captures F11 itself when pressed from the keyboard.

I wish that windowless program gets "F11" from vba. Is there any way a windowless program gets keystrokes from vba?
 

Users who are viewing this thread

Top Bottom