Hi,
I have the following code:
All it does is open a program and download a file using the .msl batch instructions (created in an earlier procedure),
The code works just fine, producing the results I want. The problem lies in the last line. I just want Excel to close the "DocumentDirect" program.
The problem is, it doesn't close. What am I missing?
I am using Excel 2007.
I have the following code:
Code:
Sub get_FDR()
TaskID = Shell("C:\Program Files\Mobius\DDR\rdswin.exe C:\temp\" & mm & dd & yy & ".msl", vbNormalFocus)
Application.Wait Now + TimeValue("00:00:20")
' Close known copy of Document Direct
AppActivate "DocumentDirect", True
SendKeys "%{F4}", False
End Sub
All it does is open a program and download a file using the .msl batch instructions (created in an earlier procedure),
The code works just fine, producing the results I want. The problem lies in the last line. I just want Excel to close the "DocumentDirect" program.
The problem is, it doesn't close. What am I missing?
I am using Excel 2007.