crowfan65
09-15-2008, 06:30 PM
I have this code to export to excel to create a backup for data.
Private Sub Command32_Click()
Dim strFile As String
strFile = "P:\Logistics Development\Quality Control\Backups\" & Format (date (),"yyyymmdd") & " Test History.xls"
stDocName = "900_Tbl_Test_Report_History"
DoCmd.TransferSpreadsheet [acExport], , stDocName, _
strFile, 0
End Sub
Only thing is when I open spreadsheet in XL after I get an unrecognizable format and it is just gobbledygook.
Is there a way to fix this?
Also can I specify a particular sheet to in the same way with a todays date as the sheet name?
thanks
Private Sub Command32_Click()
Dim strFile As String
strFile = "P:\Logistics Development\Quality Control\Backups\" & Format (date (),"yyyymmdd") & " Test History.xls"
stDocName = "900_Tbl_Test_Report_History"
DoCmd.TransferSpreadsheet [acExport], , stDocName, _
strFile, 0
End Sub
Only thing is when I open spreadsheet in XL after I get an unrecognizable format and it is just gobbledygook.
Is there a way to fix this?
Also can I specify a particular sheet to in the same way with a todays date as the sheet name?
thanks