General information
Category:
Windows API functions
>What i'm trying to do is a program that updates files automaticaly, and i need to know if the list of files that i'm going to update are currently running, if they are running then i have to close them and then do the update.
>
>About the GetObject() function, i didn't understand it, is there an example a little bit more simple?.
>
>Thanks.
If you can open a program with CreateOject() or New, as in Set oXL=New Excel.Application, then you can get a reference to the running instance with oXL = GetObject(,"Excel.Application").
But, if you already know what to look for you don't need to enumerate every running program, just specify the window names to the function in MSKB Q176391 (link on my first reply) to close them if they are running.
If the call to FindWindow API fails, (the app is not running) it will return Null.
Previous
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only