+ Reply to Thread
Results 1 to 4 of 4

Code for Pop-up Message Box with Confirmation

Hybrid View

  1. #1
    Registered User
    Join Date
    04-13-2009
    Location
    Philippines
    MS-Off Ver
    Excel 2007
    Posts
    94

    Code for Pop-up Message Box with Confirmation

    Guys, what code to use for integrating to commandbutton for showing a pop-up message box with confirmation of "yes" or "no" buttons?

    i would like to put a commandbutton on activesheet, if i press the button a message box will appear ex. "do you realy want to delete cell?" then the selection below will be visible ex. "yes" or "no".. thanks again

  2. #2
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Code for Pop-up Message Box with Confirmation

    Something like this:
    If MsgBox(("Do you really wish to delete this cell?"), vbYesNo + vbQuestion + vbDefaultButton2, _
                    "Confirmation Required:") = vbYes Then ActiveCell.ClearContents
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    ?None of us is as good as all of us? - Ray Kroc
    ?Actually, I *am* a rocket scientist.? - JB (little ones count!)

  3. #3
    Registered User
    Join Date
    04-13-2009
    Location
    Philippines
    MS-Off Ver
    Excel 2007
    Posts
    94

    Re: Code for Pop-up Message Box with Confirmation

    thanks again

  4. #4
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200

    Re: Code for Pop-up Message Box with Confirmation

    If you are satisfied with the solution(s) provided, please mark your thread as Solved.

    How to mark a thread Solved
    Go to the first post
    Click edit
    Click Go Advanced
    Just below the word Title you will see a dropdown with the word No prefix.
    Change to Solved
    Click Save
    Hope that helps.

    RoyUK
    --------
    For Excel Tips & Solutions, free examples and tutorials why not check out my web site

    Free DataBaseForm example

+ 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