Macro code to exit Excel without prompt

A

Adam

Dear all,

can someone please provide the VB macro code that will exit excel without prompt, also with prompts please. (Prompting meaning "Do you want to Save book1.xls" etc.

Thanks

Adam
 
P

Paulw2k

ActiveWorkbook.Saved=true




Adam said:
Dear all,

can someone please provide the VB macro code that will exit excel without
prompt, also with prompts please. (Prompting meaning "Do you want to Save
book1.xls" etc.
 
R

Rollin_Again

Because the Saved property is being set to True, Excel acts as if the
workbook has already been saved. This code does not save th
workbook.

Rolli
 
N

Nikos Yannacopoulos

Adam,

Application.DisplayAlerts = False
Application.Quit

to close Excel without prompts, or omit the first statement to get prompts.

HTH,
Nikos

Adam said:
Dear all,

can someone please provide the VB macro code that will exit excel without
prompt, also with prompts please. (Prompting meaning "Do you want to Save
book1.xls" etc.
 
Top