Public Function Donations_Export()
On Error GoTo LeaveExport
Dim xlApp As Object
Dim xlWb As Excel.Workbook
'Open a new Excel workbook
Set xlApp = CreateObject("Excel.Application")
'Download Query to Excel and save it
DoCmd.OutputTo acOutputQuery, "Donations_Export", acFormatXLS, "Donations_Export", False, , , acExport
'Open saved workbook for formatting
Set xlWb = xlApp.Workbooks.Open("Donations_Export")
xlApp.Visible = True
Dim x as integer, y as integer
x = 1
y = 2
debug.print x, y, x+1
So, remove the "On Error Goto …" and debug IsMSExcelRunning for one or more API calls not modified to run in 64-bit also.