jim may
Well-known Member
- Joined
- Jul 4, 2004
- Messages
- 7,486
The below Access Code I am stepping thru (Using F8); as soon as I complete the Last shown Line -- DoCmd.TransferSpreadsheet....
I open my Excel, then the file LastExport.xlsx and it is Not Updating
If I run qryDataExportedToExcel and compare content to my LastExport.xlsx
they are NOT the same; What could be happening?
TIA,
Jim
I open my Excel, then the file LastExport.xlsx and it is Not Updating
If I run qryDataExportedToExcel and compare content to my LastExport.xlsx
they are NOT the same; What could be happening?
TIA,
Jim
Code:
Sub ExportToMyExcel()
Dim appExcel As Object
Dim mySourceBook As Object
Dim myDestinationBook As Object
Dim mySourceSheet As Object
Dim myDestinationSheet As Object
Dim Rng1 As Object
Dim Rng2 As Object
Dim LR As Long
On Error Resume Next
Set appExcel = GetObject(, "Excel.Application")
If Err.Number = 429 Then
Set appExcel = CreateObject("Excel.Application")
End If
On Error GoTo 0
DoCmd.TransferSpreadsheet acExport, acSpreadsheetTypeExcel12, "qryDataExportedToExcel", _
"C:\Users\James\Documents\Trusted_Locations\CBF\LastExport.xlsx", True