Dim OleSAS As Object
Set OleSAS = CreateObject("SAS.Application")If (OleSAS.Busy) Then
Response = MsgBox("SAS Session is Busy",
vbOKOnly, "SAS Session")
Else
Response = MsgBox("SAS Session is Idle",
vbOKOnly, "SAS Session")
End If If OleSAS.Visible = False then OleSAS.Visible=True Else OleSAS.Visible=False End If
OleSAS.Title = "Automation Server"
Response = MsgBox(OleSAS.Title, vbOKOnly,
"Title Is", 0, 0)OleSAS.Submit("libname insamp
'c:\sas\insight\sample';
proc insight data=insamp.drug;
run;")OleSAS.Quit Set OleSAS = Nothing