Ghost file calling Excel fro Access

  • Thread starter Thread starter Ed
  • Start date Start date
E

Ed

Using the code below to to perform Excel functions within
MSA. It leaves behind a ghost file called "RESUME.XLW".
This causes problems on a subsequent code runs where
the "save" fails if you reply no to overlay the existing
file (RESUME.XLW). Replying "Yes" works, but this code
has to run behind the scenes and I'd really like to not
leave garbage behind on peoples' hard drives. I checked
task manager and there are no instance of Excel running,
so it's not likely needing this file for anything (that
I'm aware).

It's definitely the "save" method because if "save" is
commented out, the file does not appear. Then, of course,
it's not saved either. If you feel like commenting on
what "RESUME.XLW" is for, I'd appreciate that too. Thanks
in advance for any help.

Set appExcel = GetObject(strFleSrc)
strFleTrg = Application.CurrentProject.Path & _
"\Reports\BlockReports-Formatted.xls"
appExcel.Application.Workbooks.Open Filename:=strFleTrg
appExcel.Application.Sheets("TOC").Select
appExcel.Application.Cells(1, 3).Value = Now()
appExcel.Application.Save
appExcel.Application.Quit
Set appExcel = Nothing
 
xlw = excel workspace = collection of workbooks.
I think that your save did not complete before your close:
you need to disable background saves, or delay the close
until after the save has completed.

Only guessing though.

(david)
 
Back
Top