+ Reply to Thread
Results 1 to 4 of 4

Macro to fire when Closing File

  1. #1
    Forum Contributor
    Join Date
    09-25-2012
    Location
    Ventura, united States
    MS-Off Ver
    Excel 2010
    Posts
    346

    Macro to fire when Closing File

    I currently have a workbook saving an archive every time the file opens. The name of the macro is:

    Please Login or Register  to view this content.
    It's pasted in the Thisworkbook VBA tab and it works perfectly.

    I thought I could change it to fire when closing by changing it to:

    Please Login or Register  to view this content.
    But it doesnt seem to be working. Why not?

  2. #2
    Forum Expert
    Join Date
    06-12-2012
    Location
    Ridgefield Park, New Jersey
    MS-Off Ver
    Excel 2003,2007,2010
    Posts
    10,241

    Re: Macro to fire when Closing File

    I have an older version of Excel and never heard of Workbook_Close

    Maybe:

    Please Login or Register  to view this content.

  3. #3
    Forum Contributor
    Join Date
    07-27-2009
    Location
    montreal, canada
    MS-Off Ver
    Excel 2003
    Posts
    230

    Re: Macro to fire when Closing File

    Yeah, this should do:
    Please Login or Register  to view this content.

  4. #4
    Forum Contributor
    Join Date
    09-25-2012
    Location
    Ventura, united States
    MS-Off Ver
    Excel 2010
    Posts
    346

    Re: Macro to fire when Closing File

    Thank you!

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] Macro to check the empty Cells in a row before closing the file
    By dobracik in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 07-06-2013, 07:35 AM
  2. Macro: Closing an open file and clearing clipboard
    By plunkettyplunk in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-11-2010, 04:10 AM
  3. Macro for opening an external Batch file and closing the same at regular intervals.
    By Chintu Raju in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 04-22-2008, 03:33 AM
  4. Can an Auto_Close macro stop the file from closing?
    By doctormelodious in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 05-23-2007, 01:58 PM
  5. Replies: 3
    Last Post: 08-21-2006, 04:05 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1