Eliminating a Warning MsgBox

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

Guest

In a folder are 15 Excel Workbooks, which are being projected for presentation to an audience of managers. The workbooks need to be opened and closed as fast as possible to keep things moving. The open is working okay (could be faster), but the close is slowed down by a warning message box saying: Do you want to save the changes you made to 'File Name.xls' ? Button choices Yes, No, Cancel. Clicking on No, there is a delay in closing the workbook (hour glass icon too)

Is there a way to open and close the workbooks very fast, without all the trappings?
 
run a little macro to turn off screenupdating

sub updateoff
Application.ScreenUpdating = false
end sub

at the beginning of the presentation

create another to turn it back on (Change "false to true") at th
end..
 
whups. that should be "display alerts" instead of screen updating

sub alertsoff
application.displayalerts = false
end sub


sorry
 
This example closes Book1.xls and discards any changes that have been made
to it.

Workbook("Book1.xls").close SaveChanges:=False



Phil Hageman said:
In a folder are 15 Excel Workbooks, which are being projected for
presentation to an audience of managers. The workbooks need to be opened
and closed as fast as possible to keep things moving. The open is working
okay (could be faster), but the close is slowed down by a warning message
box saying: Do you want to save the changes you made to 'File Name.xls' ?
Button choices Yes, No, Cancel. Clicking on No, there is a delay in closing
the workbook (hour glass icon too).
Is there a way to open and close the workbooks very fast, without all the
trappings?
 
Hi
use
application.displayalerts = false
before your code and enable the alerts again with
application.displayalerts = true
after your code
 

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