Resume.xlw file

  • Thread starter Thread starter raviyah
  • Start date Start date
R

raviyah

I am populating an excel spreadsheet from Access code. When I save the
spreadsheet, I get a message that there exists a RESUME.XLW file and do I
want to overwrite it. I don't get this when I save the file in excel but it
pops up every time I do an

xlApp.Save

What is the RESUME.XLW file and can I stop the message from showing?
 
Hi raviyah,

before you save, do this:

'~~~~~~~~~~~~~~~~
if len(dir(strPathFilename)) > 0 then
kill strPathFilename
doEvents
end if
'~~~~~~~~~~~~~~~~

also, usually xlApp is a name indicating an application object ... not a
workbook object -- perhaps you should choose better variable names -- or
reference the workbook specifically, not the application


Warm Regards,
Crystal
remote programming and training

Video Tutorials on YouTube!
http://www.youtube.com/user/LearnAccessByCrystal

Access Basics
8-part free tutorial that covers essentials in Access
http://www.AccessMVP.com/strive4peace

*
(: have an awesome day :)
*
 
Crystal,

xlApp is an application object. Should I be using

xlApp.xlWB Save?

Also, what does the 'kill' and doevents statements do. Just curious.
 
kill deletes a file -- delete it first (if it already exists) before you
save with the same name to prevent getting a prompt to overwrite
should I be using

xlApp.xlWB Save?

probably not -- if you set xlWB with a reference to xlApp, then you
would do this:

xlWb.Save

~~~ DoEvents ~~~

DoEvents is used to make VBA pay attention to what is currently
happening and look to see if the OS (Operating System) has any requests
-- including the keyboard or noticing that a file has been deleted or
created

ie: if you have a loop and want to be able to BREAK it with CTRL-BREAK,
put DoEvents into the loop

DoEvents will also update values written to a form by a general
procedure or code behind another form or report

A DoEvents is done when you use MsgBox, or are stepping through code
(since it has to pay attention to the keyboard)

It is a good way to say, "Wake Up!"



Warm Regards,
Crystal
remote programming and training

Video Tutorials on YouTube!
http://www.youtube.com/user/LearnAccessByCrystal
(open by clicking on the video thumbnail so you get the "high quality"
option)

Access Basics
8-part free tutorial that covers essentials in Access
http://www.AccessMVP.com/strive4peace

*
(: have an awesome day :)
*
 
Crystal,

Thank you. This answers some questions and the code is working much better
now.
 
Back
Top