+ Reply to Thread
Results 1 to 3 of 3

Is there a way to Trigger a Macro on a workbook save event

  1. #1
    Dan Gardner
    Guest

    Is there a way to Trigger a Macro on a workbook save event

    I have a macro that performs a bunch of database conformity checks, i.e.
    proper input format into a excel database. I was wondering if there is a way
    to trigger the macro when the user tries to save the workbook, and be able to
    correct any errors found before the save event takes place
    Hope it’s possible, and thanks for any help that can be offered


  2. #2
    Forum Contributor
    Join Date
    09-05-2004
    Location
    Melbourne
    Posts
    193
    There is a workbook event called BeforeSave. Check the Visual Basic Help or this Forum on BeforeSave.

    Cheers!

  3. #3
    Dave Peterson
    Guest

    Re: Is there a way to Trigger a Macro on a workbook save event

    There's a workbook_beforesave event that you may want to tap into.

    You could set "cancel=true" and stop the save.

    Chip Pearson has a nice primer at:
    http://www.cpearson.com/excel/events.htm

    Dan Gardner wrote:
    >
    > I have a macro that performs a bunch of database conformity checks, i.e.
    > proper input format into a excel database. I was wondering if there is a way
    > to trigger the macro when the user tries to save the workbook, and be able to
    > correct any errors found before the save event takes place
    > Hope it’s possible, and thanks for any help that can be offered


    --

    Dave Peterson

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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