how to avoid excel pop-up in macro

  • Thread starter Francesco Magagnino
  • Start date
F

Francesco Magagnino

Hello,
i use a macro to divide an excel file in many files, and create and
delete some sheet.
This run many times.
All the times a file is saved overwriting an existing one i ask me
what to do; the same when the command say to delete a sheet.

there is a way to avoid this.
i need to run the macro and leave the pc make everything without
anybody present

thanks
franz
 
K

Kevin B

Add the following statement before you start processing your files:

Application.DisplayAlerts = False

Although your alerts will come back on after the macro finishes running I
always add the following line at the end of the macro:

Application.DisplayAlerts = True

It keeps it tidy and who knows if it will become mandatory in some later
release of Excel.
 
F

FSt1

hi,
at the start of your macro add this line...
application.displayalerts = false

then at the end of the macro, turn alerts back on...
application.displayalerts = true

regards
FSt1
 
F

Francesco Magagnino

Thanks guys!!
but some are still coming out.. the one that say: "to permanently
delete the data press delete!"

why?

franz
 

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

Top