Results 1 to 3 of 3

Thread: Message Box Before Saving Document

  1. #1
    Junior Member
    Join Date
    Apr 2012
    Posts
    8
    Rep Power
    0

    Message Box Before Saving Document

    Hello,
    Does anybody know how to make a Message Box appear every time the user saves an excel document. The box will say "Please don't forget to sign the document before submitting it". Users tend to forget it so I want to add the message box to remind them every time they save the doc. I know it could be annoying but that's fine.

    Thank you!!!

    ~Lucero

    https://www.youtube.com/channel/UCnxwq2aGJRbjOo_MO54oaHA
    https://eileenslounge.com/viewtopic.php?p=320960#p320960
    https://eileenslounge.com/viewtopic.php?p=320957#p3209573
    https://eileenslounge.com/viewtopic.php?p=318868#p318868
    https://eileenslounge.com/viewtopic.php?p=318311#p318311
    https://eileenslounge.com/viewtopic.php?p=318302#p318302
    https://eileenslounge.com/viewtopic.php?p=317704#p317704
    https://eileenslounge.com/viewtopic.php?p=317704#p317704
    https://eileenslounge.com/viewtopic.php?p=317857#p317857
    https://eileenslounge.com/viewtopic.php?p=317541#p317541
    https://eileenslounge.com/viewtopic.php?p=317520#p317520
    https://eileenslounge.com/viewtopic.php?p=317510#p317510
    https://eileenslounge.com/viewtopic.php?p=317547#p317547
    https://eileenslounge.com/viewtopic.php?p=317573#p317573
    https://eileenslounge.com/viewtopic.php?p=317574#p317574
    https://eileenslounge.com/viewtopic.php?p=317582#p317582
    https://eileenslounge.com/viewtopic.php?p=317583#p317583
    https://eileenslounge.com/viewtopic.php?p=317605#p317605
    https://eileenslounge.com/viewtopic.php?p=316935#p316935
    https://eileenslounge.com/viewtopic.php?p=317030#p317030
    https://eileenslounge.com/viewtopic.php?p=317030#p317030
    https://eileenslounge.com/viewtopic.php?p=317014#p317014
    https://eileenslounge.com/viewtopic.php?p=316940#p316940
    https://eileenslounge.com/viewtopic.php?p=316927#p316927
    https://www.youtube.com/channel/UCnxwq2aGJRbjOo_MO54oaHA
    Last edited by DocAElstein; 10-04-2024 at 10:28 PM.

  2. #2
    Administrator Admin's Avatar
    Join Date
    Mar 2011
    Posts
    1,123
    Rep Power
    10
    Hi,

    this goes in workbook module.

    Code:
    Private Sub Workbook_BeforeClose(Cancel As Boolean)
        MsgBox "Please don't forget to sign the document before submitting it"
    End Sub
    Cheers !

    Excel Range to BBCode Table
    Use Social Networking Tools If You Like the Answers !

    Message to Cross Posters

    @ Home - Office 2010/2013/2016 on Win 10 (64 bit); @ Work - Office 2016 on Win 10 (64 bit)

  3. #3
    Senior Member
    Join Date
    Apr 2011
    Posts
    190
    Rep Power
    14
    Code:
    strMsg = "You must select the node - before you can delete it."
    intMsgType = vbExclamation + vbOkCancel
    intResponse = MsgBox(strMsg, intMsgType, "Operator action")

    Wirh this example you can also exit your routine - depending on selection - Just an example
    xl2007 - Windows 7
    xl hates the 255 number

Similar Threads

  1. Replies: 8
    Last Post: 05-21-2013, 06:34 AM
  2. Message Box Pop-Up "yes or no"
    By Ryan_Bernal in forum Excel Help
    Replies: 1
    Last Post: 02-19-2013, 06:20 PM
  3. Display sheet names in a message box
    By pells in forum Excel Help
    Replies: 4
    Last Post: 02-13-2013, 07:33 PM
  4. Reading/Saving binary data
    By Rasm in forum Excel Help
    Replies: 3
    Last Post: 02-26-2012, 08:15 PM
  5. Saving Embedded Picture From Excel Workbook Sheet To Folder Hard Drive
    By littleiitin in forum Excel and VBA Tips and Tricks
    Replies: 0
    Last Post: 10-31-2011, 02:31 PM

Posting Permissions

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