Get rid of prompts

D

Duncan J

Hi Folks
I've got a big macro, several tied into one. However, when running the macro the prompts always come up one asks do you want to save, "YES" "NO" which I'd like it automatically save with out the prompt. Then another on comes on I don't want to save. Here's the code
ActiveWorkbook.SaveAs Filename:="C:\otd\data\compile\International.xls",
FileFormat:=xlNormal, Password:="", WriteResPassword:="",
ReadOnlyRecommended:=False, CreateBackup:=Fals
ActiveWorkbook.Clos
ActiveWorkbook.Clos
I suppose when closing the active workbook the prompt comes up asking me to save and I don't want to save the second one. But also do not want the prompt to show
Thanks again..
 
T

Tushar Mehta

What is the cause of the first prompt? The .SaveAs or the .Close? Is
the first prompt about whether you want to save the workbook? Or is it
about whether you want to replace an existing file?

Also, why two consecutive .Close statements?

--
Regards,

Tushar Mehta, MS MVP -- Excel
www.tushar-mehta.com
Excel, PowerPoint, and VBA add-ins, tutorials
Custom MS Office productivity solutions
 

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

Similar Threads


Top