R
ryguy7272
I thought a simple sub, such as the following, which I found on this DG,
would allow me to copy/paste the results of a Query to an Excel SS:
Private Sub Command1_Click()
Dim stDocName As String
stDocName = "qryCurrentQ"
'This code does not work
DoCmd.OutputTo acOutputReport, stDocName, acFormatXLS, "c:\Current.xls"
End Sub
All this does is delete the Worksheet (Current.xls) that resides on the C:
drive and...that's it. How can I send the results of a Query to an Excel SS?
Regards,
Ryan---
would allow me to copy/paste the results of a Query to an Excel SS:
Private Sub Command1_Click()
Dim stDocName As String
stDocName = "qryCurrentQ"
'This code does not work
DoCmd.OutputTo acOutputReport, stDocName, acFormatXLS, "c:\Current.xls"
End Sub
All this does is delete the Worksheet (Current.xls) that resides on the C:
drive and...that's it. How can I send the results of a Query to an Excel SS?
Regards,
Ryan---