Dear All
I need to generate an excell file as user click a label. I used the following code but got a compile error. the code is given below
Private Sub Label61_Click()
DoCmd.OutputTo Table, IncTransaction, ExcelWorkbook(*.xlsx), d:/fuel&incentive/Inc.xlsx, Yes, , 0, print
'DoCmd.Quit
End Sub
This is working in macro but in VBA it gives error.
Need help
Thanks.
Wasim