Hi, I'm beginner in coding and Access. I have to export Report with a graph into Excel, but I'm getting this error 2495 ' The action or method required a Table Name argument.' below should be my code that I using right now. I hope to find any solution, that could help me in my project.
Private Sub Command10_Click()
Dim reportname As String
Dim theFilePath As String
reportname = "Report1"
theFilePath = "C:\Users\DDPP\Desktop\"
theFilePath = theFilePath & reportname & "_" & Format(Date, "yyyy-mm-dd") & ".xls"
DoCmd.TransferSpreadsheet acExport, acSpreadsheetTypeExcel11, Report1, theFilePath, True
End Sub
Private Sub Command10_Click()
Dim reportname As String
Dim theFilePath As String
reportname = "Report1"
theFilePath = "C:\Users\DDPP\Desktop\"
theFilePath = theFilePath & reportname & "_" & Format(Date, "yyyy-mm-dd") & ".xls"
DoCmd.TransferSpreadsheet acExport, acSpreadsheetTypeExcel11, Report1, theFilePath, True
End Sub