D
Daniel Bonallack
I have the below code (copied from this forum) to extract data from Access
and copy it to the active Excel worksheet.
What I want is for that last line to copy the data to a txt file, and save
that file with name "myText.txt" to L:\Storage\
Thanks in advance!
Daniel Bonallack
_____________________
' Open the connection
Set Connection = New ADODB.Connection
Cnct = "Provider=Microsoft.Jet.OLEDB.4.0; "
Cnct = Cnct & "Data Source=" & DBFullName & ";"
Connection.Open ConnectionString:=Cnct
' Create RecordSet
Set Recordset = New ADODB.Recordset
Recordset.Open Source:=SQLString, ActiveConnection:=Connection
Range("A1").CopyFromRecordset Recordset
and copy it to the active Excel worksheet.
What I want is for that last line to copy the data to a txt file, and save
that file with name "myText.txt" to L:\Storage\
Thanks in advance!
Daniel Bonallack
_____________________
' Open the connection
Set Connection = New ADODB.Connection
Cnct = "Provider=Microsoft.Jet.OLEDB.4.0; "
Cnct = Cnct & "Data Source=" & DBFullName & ";"
Connection.Open ConnectionString:=Cnct
' Create RecordSet
Set Recordset = New ADODB.Recordset
Recordset.Open Source:=SQLString, ActiveConnection:=Connection
Range("A1").CopyFromRecordset Recordset