Hello,
I am trying to run an application from excel using the shell statement to open it and then the sendkeys statement to control it.
I am having a problem because when the application has done its job I want to close it using 'sendkeys "%Fx", True'. However, because the application takes a long time to run the sendkeys statement doesn't shut the application down.
I have tried using the DoEvents statement to delay when the sendkeys statement is called, but this doesn't work.
I know I could also use Application.Wait, but I won't always know how long I will need to wait until the application has run.
Any ideas please?
I am trying to run an application from excel using the shell statement to open it and then the sendkeys statement to control it.
I am having a problem because when the application has done its job I want to close it using 'sendkeys "%Fx", True'. However, because the application takes a long time to run the sendkeys statement doesn't shut the application down.
I have tried using the DoEvents statement to delay when the sendkeys statement is called, but this doesn't work.
I know I could also use Application.Wait, but I won't always know how long I will need to wait until the application has run.
Any ideas please?