Question:

Need help writing an excel macro

by  |  earlier

0 LIKES UnLike

When I go to close out a spreadsheet the dialog box pops up that asks if you want to save. Is there code that I can add in the macro to respond to the dialog box?

 Tags:

   Report

1 ANSWERS


  1. Yes there is:

    In a module (in the VB editor, Insert, Module), add the following macro:

    Sub Auto_Close()

      ActiveWorkbook.Save

    End Sub

    This will save the workbook when you close it and *not* bring up that dialog box.

    Hope that helps

Question Stats

Latest activity: earlier.
This question has 1 answers.

BECOME A GUIDE

Share your knowledge and help people by answering questions.
Unanswered Questions