+ Reply to Thread
Results 1 to 3 of 3

MsgBox with VBYesNoCancel

  1. #1
    Forum Expert NeedForExcel's Avatar
    Join Date
    03-16-2013
    Location
    Pune, India
    MS-Off Ver
    Excel 2016:2019, MS 365
    Posts
    3,874

    MsgBox with VBYesNoCancel

    Hey!!

    If suppose I write a code where at the time of closing the workbook a message box appears asking me if I wanted to make a back up of this file.

    Clicking Yes would Make a back Up
    Clicking No would Exit Workbook
    And Clicking cancel would just cancel the Msg Box.

    How should I write the code for the cancel button.

    I have already written codes for the yes & no buttons.

    Please Login or Register  to view this content.
    Cheers!
    Deep Dave

  2. #2
    Valued Forum Contributor
    Join Date
    03-29-2013
    Location
    United Kingdom
    MS-Off Ver
    Office/Excel 2013
    Posts
    1,749

    Re: MsgBox with VBYesNoCancel

    Selecting cancel prevents the workbook from closing
    Please Login or Register  to view this content.
    Elegant Simplicity............. Not Always

  3. #3
    Forum Expert NeedForExcel's Avatar
    Join Date
    03-16-2013
    Location
    Pune, India
    MS-Off Ver
    Excel 2016:2019, MS 365
    Posts
    3,874

    Re: MsgBox with VBYesNoCancel

    Perfect!!

    Thank You.

    Marking the thread as solved!

+ 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