Retreive hWnd without FindWindow?
Posted on 2007-04-09
I swear I was using a built-in VBA function last week to find out if an application was already running before launching it with the shell function.
The problem is I've lost that work and I can't remember what the function was called.
It's not FindWindow
And as I recall it was a simple built-in VBA function that returned the hWnd of a window as long, by any portion of the application's caption.
That is, it would return a hWnd for the application "Mainframe Session 3 - Microsoft Internet Explorer" if you did function("mainframe session 3")
All I really need to do is find out if an application is already running based on the title bar text, if it is make it active, if it isn't launch it and make it active.