J
JT
I have a macro in Access that I'm runnign and using the code below to save a
file in Excel. How do I save this file as Excel 2003. I have Excel 2007 on
my machine and when I try to open the file later in the code I get an error
message that says "External Table is not in the expected format.". The macro
is erroring out on the following line:
DoCmd.TransferSpreadsheet acExport, 8, "Sum_CN", DataFile, False
Any help would be greatly appreciated. Thanks...
With ExcelApp
.Workbooks.Add
.Application.DisplayAlerts = False
.ActiveWorkbook.SaveAs FileName:="C:\Test\Data File.xls"
.Application.DisplayAlerts = True
DataFile = "C:\Test\Data File.xls"
.ActiveWorkbook.Close (True)
ControlFile = "N:\Users\E77306\Control File.xls"
DoCmd.TransferSpreadsheet acExport, 8, "Sum_US", DataFile, False
End With
file in Excel. How do I save this file as Excel 2003. I have Excel 2007 on
my machine and when I try to open the file later in the code I get an error
message that says "External Table is not in the expected format.". The macro
is erroring out on the following line:
DoCmd.TransferSpreadsheet acExport, 8, "Sum_CN", DataFile, False
Any help would be greatly appreciated. Thanks...
With ExcelApp
.Workbooks.Add
.Application.DisplayAlerts = False
.ActiveWorkbook.SaveAs FileName:="C:\Test\Data File.xls"
.Application.DisplayAlerts = True
DataFile = "C:\Test\Data File.xls"
.ActiveWorkbook.Close (True)
ControlFile = "N:\Users\E77306\Control File.xls"
DoCmd.TransferSpreadsheet acExport, 8, "Sum_US", DataFile, False
End With