excel vba - Is there a way for Visual Basic to know if a 3rd party program is minimized? -


i trying make program in excel visual basic communicate a, rather archaic program, in company stores of sales information.

i hoping way allow excel program know when 3rd party program done it's task.

i have created macro within other program, ends minimizing program, , wondering if vba can know window of other program minimized or not.

although realize found work-around in comments, thought i'd post solution else finds question. can use api call isiconic test whether window minimized:

private declare function findwindow lib "user32" alias "findwindowa" _     (byval lpclassname string, byval lpwindowname string) long private declare function isiconic lib "user32" _     (byval hwnd long) boolean  public sub example()      shell "notepad.exe", vbminimizednofocus      dim hwnd long     hwnd = findwindow(vbnullstring, "untitled - notepad")     debug.print isiconic(hwnd)  end sub 

Comments

Popular posts from this blog

PHP DOM loadHTML() method unusual warning -

python - How to create jsonb index using GIN on SQLAlchemy? -

c# - TransactionScope not rolling back although no complete() is called -