View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Paul B[_7_] Paul B[_7_] is offline
external usenet poster
 
Posts: 73
Default Getting rid of Prompts in a macro

Duncan, try Application.DisplayAlerts = False, this Want show display
alerts, turn it back on at the end of you code
something like this

Application.DisplayAlerts = False
'Your Code
Application.DisplayAlerts = True

--
Paul B
Always backup your data before trying something new
Please post any response to the newsgroups so others can benefit from it
Feedback on answers is always appreciated!
Using Excel 97 & 2000
** remove news from my email address to reply by email **

"Duncan J" wrote in message
...
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:=False
ActiveWorkbook.Close
ActiveWorkbook.Close
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...