Command Buttons and exporting table to Excel

deeda67

Registered User.
Local time
Today, 14:02
Joined
Jan 24, 2007
Messages
30
QUICK QUESTION:

I'm trying to export a table to a specific filepath/filename (so the table will be exported as the same file name every week for updating). I followed my VB instructions (so I think) and it doesn't give me a debug problem now, but its not working. Could someone let me know what I did wrong?

Private Sub Command17_Click()

Dim exportfile As String
exporttable = "Project Table"
DoCmd.TransferSpreadsheet acExport, acSpreadsheetTypeExcel7, "Project Table", exportfile = "J:\Staff\D\Database\Summerville Project Table", True

End Sub
 
Just write it like this:
Code:
Private Sub Command17_Click()
DoCmd.TransferSpreadsheet acExport, acSpreadsheetTypeExcel7, "Project Table", "J:\Staff\D\Database\Summerville Project Table", True
End Sub
 
Thank You!!!!!!!!!!!!!
 

Users who are viewing this thread

Back
Top Bottom