Dear readers,
I'm having a problem with SAS when executing SAS in batch mode while a userform is active in Excel.
Is there any way to run the SAS in batch mode while a userform is active?
If not, is there any way to check when the 'batch APP' has completed its run and then re-open the userform?
I've tried the following :
I'll appreciate any help.
Thanks
I'm having a problem with SAS when executing SAS in batch mode while a userform is active in Excel.
Is there any way to run the SAS in batch mode while a userform is active?
If not, is there any way to check when the 'batch APP' has completed its run and then re-open the userform?
I've tried the following :
- Creating an empty file from SAS as the last statement and then check in excel when the mentioned file exists (Using a loop);
- Userform.hide and userform.show in the same SUB;
- Using the waitonreturn with shell function in Excel (This executes the 'batch APP', but the score.sas code isn't executing);
- sApp = "SAS.Application"
If IsAppRunning(sApp) = True
Function IsAppRunning(ByVal sAppName) As Boolean
Dim oApp As Object
On Error Resume Next
Set oApp = GetObject(, sAppName)
If Not oApp Is Nothing Then
Set oApp = Nothing
IsAppRunning = True
End If
End Function;
I'll appreciate any help.
Thanks