Sorry for being vague with my problem, here's some of the code I'm using
An Access file exports some queries to the given excel file and calls one of its procedures
... setup xlapp and file objects
DoCmd.TransferSpreadsheet transfertype:=acExport, tablename:="Query", Filename:="...file.xls"
...
file.Open "...file.xls"
'Run populateData Procedure of the excel file
xlApp.Run "populateData"
xlApp.Visible = True
Set file = Nothing
Set xlApp = Nothing
the procedure populateDate contains:
With ActiveWorkbook
On Error Resume Next
Application.DisplayAlerts = False
.Sheets("Qry_YearlyInvoiceSummary").Delete
.Sheets("Qry_YTDDiscardsGrouped").Delete
.Sheets("Qry_YTDInventoryCountsGrouped").Delete
Application.DisplayAlerts = True
End With
I'm sure that i'm opening the same file all the time and sheet/file names are spelled correctly
Bookmarks