The following code will only work if PPM.EXE is shown in the task bar. You must also know what the caption of the taskbar button should be.
Code:
On Error Resume Next
AppActivate "PPM.EXE" ' This should be the caption of the application
' If the application is not running then a run-time
' error 5 will be generated. Test for this error now
If Err.Number = 5 Then
If Dir(App.Path & "\PPM.exe") = "" Then
MsgBox ("Multi Currency functionality not available")
Exit Sub
Else
Shell App.Path & "\PPM.exe", vbNormalFocus
End If
Else
' PPM.EXE was already running and now has the focus
End If
There are other ways of doing this with API calls, however this is the simplest. The problem with it is that it will not work if the caption of PPM.EXE changes during it's execution.
Regards
Owain Williams