Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

launching/restoring applications with buttons

Status
Not open for further replies.

jondodd

IS-IT--Management
May 20, 2002
1
GB
Hi,

I am sure this is trivial to you access gurus but I have reached the extent of my VBA and need direction.

I wish to have a button on a form that launches an application - but if the application is already launched then I want it to restore that application. Also can I specify the screen position and size of the the launched/restored application?

(I used shell command and AppActivate in separate modules but am unable to hack them together to do what I want).

many thanks for any help offered

Jon
 
Actually what you need for these tasks is to use some API's. There really aren't too difficult to use. I don't have my API book with me, but Dan Appleman has a book out that describes a majority of these in great detail and excellent reference. I will try to get the actual API calls for you asap.

Shane
 
You might also be able to get this to work by doing somthing along the lines of the following:

if tasks.exixts(name:="nameofapp ie. microsoft excel or word") = true then
'run your appactivate code
else
'run your shell code
end if
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top