Originally Posted by
PhatRam32
As anyone successfully run a SAS program file within a Macro that includes other queries within MS Access.
Basically I have my macro to run 3 items. The issue I'm having is that MS Access will proceed to Query1 before the SAS program is finished running and wanted to see if there was a way to tell MS Access to not run Query1 until the SAS program finished its run.
RunCode () -This is where VBA calls and runs the SAS program
OpenQuery (Query1)
OpenQuery (Query2)
VBA code to run SAS:
Public Function RunSAS()
Dim olesas As Object
Set olesas = CreateObject("SAS.Application")
olesas.Submit ("%include 'C:\DATA\Clinical Operations Reporting\Weekly\Reports\HepC\Files\SAS\report_pul l.sas_2a_after.sas'; ")
olesas.Visible = True
olesas.Quit
Set oleasas = Nothing
End Function