Consulting

Results 1 to 3 of 3

Thread: Solved: Prompt before Exit

  1. #1
    VBAX Regular
    Joined
    Mar 2010
    Posts
    49
    Location

    Solved: Prompt before Exit

    Hi,

    I have a VBA code not to save the work book on exit. I am looking for some help on a message box that also ask "Are you sure you want to exit". Yes No...

    Many thanks in advance.

  2. #2
    Distinguished Lord of VBAX VBAX Grand Master Bob Phillips's Avatar
    Joined
    Apr 2005
    Posts
    25,453
    Location
    [vba]

    If MsgBox("Are you sure you want to exit", vbYesNo, "Workbook Save") = vbNo Then

    'your code
    End If
    [/vba]
    ____________________________________________
    Nihil simul inventum est et perfectum

    Abusus non tollit usum

    Last night I dreamed of a small consolation enjoyed only by the blind: Nobody knows the trouble I've not seen!
    James Thurber

  3. #3
    VBAX Regular
    Joined
    Mar 2010
    Posts
    49
    Location
    Quote Originally Posted by xld
    [vba]

    If MsgBox("Are you sure you want to exit", vbYesNo, "Workbook Save") = vbNo Then

    'your code
    End If
    [/vba]
    Thanks XLd

Posting Permissions

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