I can do the following when running Queries from access to put them in Excel.
' PUT QUERY TO RECORD SET
Set rst = New ADODB.Recordset
rst.Open VtSQL, CurrentProject.Connection, adOpenDynamic, adLockOptimistic
How do I do the same thing using SQL?
objCommand.CommandText = VtSQL
objCommand.Execute
With XLwb.Worksheets("Primary")
.Range("B2").CopyFromRecordset rst
THANKS!!!
' PUT QUERY TO RECORD SET
Set rst = New ADODB.Recordset
rst.Open VtSQL, CurrentProject.Connection, adOpenDynamic, adLockOptimistic
How do I do the same thing using SQL?
objCommand.CommandText = VtSQL
objCommand.Execute
With XLwb.Worksheets("Primary")
.Range("B2").CopyFromRecordset rst
THANKS!!!