+ Reply to Thread
Results 1 to 5 of 5

Macro after save event

  1. #1
    Forum Contributor
    Join Date
    11-14-2007
    Posts
    111

    Macro after save event

    is it possible to have a macro to run after save is pushed and/or after worksheet is closed and save is chosen?

    thanks

  2. #2
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200
    There is no After_Save event, only the Before_Save event of the WorkBook. What exactly do you want to do
    Hope that helps.

    RoyUK
    --------
    For Excel Tips & Solutions, free examples and tutorials why not check out my web site

    Free DataBaseForm example

  3. #3
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,258
    Hello Ada01,

    Welcome to the Forum!

    Yes, if the macro is placed in the Workbook_BeforeClose(Cancel As Boolean) code module in ThisWorkbook.

    Sincerely,
    Leith Ross

  4. #4
    Forum Contributor
    Join Date
    11-14-2007
    Posts
    111
    How do you set that up. I am in the process of learning some of this stuff and when i comes to modules and workbooks, i start to lose my macro.

    I just need the set up so i get the macro in the right place

  5. #5
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,258
    Hello Ada01,

    After you have recorded or written your macro, follow these steps...

    How to Save a Workbook Event Macro
    1. Copy the macro using CTRL+C keys.
    2. Open your Workbook and Right Click on any Worksheet's Name Tab
    3. Left Click on View Code in the pop up menu.
    4. Press ALT+F11 keys to open the Visual Basic Editor.
    5. Press CTRL+R keys to shift the focus to the Project Explorer Window
    6. Press the Down Arrow Key until ThisWorkbook is highlighted in blue.
    7. Press the Enter key to move the cursor to the Code Window
    8. Paste the macro code using CTRL+V
    9. Save the macro in your Workbook using CTRL+S

    Sincerely,
    Leith Ross

+ 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. Macro to save emailed file in Lotus Notes with changing filename
    By liquidskin in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 08-23-2008, 02:53 PM
  2. Event macro
    By DanJF in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-28-2008, 05:11 AM
  3. running an event macro when selecting a certain sheet
    By roasty_1 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 11-14-2007, 12:54 PM
  4. Save As Name Macro
    By statey in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 07-12-2007, 12:36 PM

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