Hi everyone,
Simple question, I would like a button in my Access application to export a report to excel, then run an excel macro that is stored in PERSONAL.XLS so that it is seemless. Here is the feble attempt that I have made thus far.
Thanks for your help
Simple question, I would like a button in my Access application to export a report to excel, then run an excel macro that is stored in PERSONAL.XLS so that it is seemless. Here is the feble attempt that I have made thus far.
Code:
Private Sub cmdRunXL_Click()
On Error GoTo Err_cmdRunXL_Click
Dim XL As Excel.Application
DoCmd.OutputTo acOutputReport, "qryBackLogWithActuals", acFormatXLS, "TEST_1.xls", True
XL.Run "PERSONAL.XLS!BacklogFix"
Exit_cmdRunXL_Click:
Exit Sub
Err_cmdRunXL_Click:
MsgBox Err.Description
Resume Exit_cmdRunXL_Click
End Sub
Comment