Close with no pop-up?

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi All.....

I have a macro that opens a second workbook and does things with it and then
I want to close it, but then I give it the following code, the macro stops,
and I get a pop-up that asks "Do you want to save?".....No, I don't want to
save and No, I don't want the pop-up to stop my macro operation.........how
please can I close the other workbook without getting the pop-up?


'Close the q793Complete workbook
Windows("q793Complete.xls").Activate
ActiveWorkbook.Close

TIA
Vaya con Dios,
Chuck, CABGx3
 
Hi, try something like this (Assuming that the workbook is the active
workbook):

Application.DisplayAlerts = False
ActiveWorkbook.Close SaveChanges:=False
Application.DisplayAlerts = True

HTH--Lonnie M.
 
Thanks Lonnie, that worked just great!!

Vaya con Dios,
Chuck, CABGx3
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top