dont need step 1 if you can import data from SAS.
do you have an ODBC for SAS? This allows you to connect to the SAS table, then the table can reside in Access.
or
use the connection code to connect into Access or Excel.
something like:
Public Sub CopyRstIntoXL()
Dim con As ADODB.Connection
Dim rs As ADODB.Recordset
Dim DB
Dim vProvid
Set con = New ADODB.Connection
Set rs = New ADODB.Recordset
db = "MyDB"
vProvid = "SASOLEDB" 'some sort of SAS driver?
With con
.Provider = vProvid
.Open "Data Source=" & DB
End With
rs.Open "select * from tMyTable", con
ActiveWorkbook.Worksheets("Sheet1").Range("A1").CopyFromRecordset rs
rs.Close
con.Close
End Sub
Bookmarks