+ Reply to Thread
Results 1 to 3 of 3

Initiate Macro On Save

  1. #1
    Registered User
    Join Date
    05-06-2006
    Posts
    39

    Initiate Macro On Save

    I need to initiate a macro when someone tries to "save" or "save as..." a file. Is that possible?

  2. #2
    Jim Thomlinson
    Guest

    RE: Initiate Macro On Save

    There is a Before Save Event associted with ThisWorkbook. Right Click the
    Excel Icon next to File on the menu bar and select View Code. Then paste the
    following...

    Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As Boolean)
    msgbox "you are saving..."
    End Sub
    --
    HTH...

    Jim Thomlinson


    "JTWood" wrote:

    >
    > I need to initiate a macro when someone tries to "save" or "save as..."
    > a file. Is that possible?
    >
    >
    > --
    > JTWood
    > ------------------------------------------------------------------------
    > JTWood's Profile: http://www.excelforum.com/member.php...o&userid=34192
    > View this thread: http://www.excelforum.com/showthread...hreadid=551610
    >
    >


  3. #3
    Registered User
    Join Date
    05-06-2006
    Posts
    39
    Quote Originally Posted by Jim Thomlinson
    There is a Before Save Event associted with ThisWorkbook. Right Click the
    Excel Icon next to File on the menu bar and select View Code. Then paste the
    following...

    Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As Boolean)
    msgbox "you are saving..."
    End Sub
    --
    HTH...

    Jim Thomlinson


    "JTWood" wrote:

    >
    > I need to initiate a macro when someone tries to "save" or "save as..."
    > a file. Is that possible?
    >
    >
    > --
    > JTWood
    > ------------------------------------------------------------------------
    > JTWood's Profile: http://www.excelforum.com/member.php...o&userid=34192
    > View this thread: http://www.excelforum.com/showthread...hreadid=551610
    >
    >
    Excellent. I will try this out today.

    Thanks!

+ 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