MrExcel Publishing
Your One Stop for Excel Tips & Solutions

Auto answer a Message box


Posted by Phil Ridley on January 29, 2002 7:18 PM

The company I work for has an annoying document management system that ties into excel. When you try to save a document that has not been profiled by this system, Excel displays a message box asking if you really want to save it without profiling it.

How can I auto answer YES to this message box in a VB macro ?

Thanks,
Phil.


Posted by Juan Pablo G. on January 29, 2002 9:30 PM

If the default Excel uses is YES, then use

Application.DisplayAlerts = False

at the beggining, and restore it to True at the end.

Juan Pablo G.