Closed Thread
Results 1 to 9 of 9

How to add yes no popup box

  1. #1
    Valued Forum Contributor
    Join Date
    09-04-2007
    Location
    Ontario, Ca
    Posts
    624

    How to add yes no popup box

    I have a macro that deletes the row where the active cell is on. Works perfectly.

    I want to have my macro display a pop-up box that gives the user the option to either delete or not delete the row.

    I would like the question to read . . . Are You Sure You Want To Delete ?

    The options would be Yes or No.

    I have no idea where to start.
    Last edited by Launchnet; 01-09-2010 at 03:45 PM.
    Thanks for helping . . .
    Matt @ Launchnet

  2. #2
    Forum Moderator davesexcel's Avatar
    Join Date
    02-19-2006
    Location
    Regina
    MS-Off Ver
    MS 365
    Posts
    13,483

    Re: How to add yes no popup box

    How is the macro being activated?

  3. #3
    Valued Forum Contributor
    Join Date
    09-04-2007
    Location
    Ontario, Ca
    Posts
    624

    Re: How to add yes no popup box

    Hi DavesExcel . . .

    By clicking a button on the worksheet in the header. The header is made up of 10 rows and the code stops this delete row function from working if the active cell is in any of the 1st 10 rows.

    All I need, is at the very beginning of the macro to have a yes no option so that the user gets one last change to not delete if the user changes mind.

  4. #4
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: How to add yes no popup box

    Make life simple and post the code, Matt.
    Entia non sunt multiplicanda sine necessitate

  5. #5
    Valued Forum Contributor
    Join Date
    09-04-2007
    Location
    Ontario, Ca
    Posts
    624

    Re: How to add yes no popup box

    Please Login or Register  to view this content.

  6. #6
    Forum Moderator davesexcel's Avatar
    Join Date
    02-19-2006
    Location
    Regina
    MS-Off Ver
    MS 365
    Posts
    13,483

    Re: How to add yes no popup box

    Here is an example of a YesNo MsgBox

    Please Login or Register  to view this content.

  7. #7
    Valued Forum Contributor
    Join Date
    09-04-2007
    Location
    Ontario, Ca
    Posts
    624

    Re: How to add yes no popup box

    Thanks Dave . . . You all do a great job.

    Works perfect.

  8. #8
    Forum Contributor ebin charles's Avatar
    Join Date
    03-31-2010
    Location
    Dammam, Saudi Arabia
    MS-Off Ver
    Microsoft Excel 2010
    Posts
    255

    Re: How to add yes no popup box

    Hey!

    I applied this macro to my worksheet it works fine. But the second message
    ("Your Code goes here") should close automatically. This msg should popup and close automatically.

    Regards
    Charles

  9. #9
    Forum Expert teylyn's Avatar
    Join Date
    10-28-2008
    Location
    New Zealand
    MS-Off Ver
    Excel 365 Insider Fast
    Posts
    11,372

    Re: How to add yes no popup box

    ebin charles,

    Your post does not comply with Rule 2 of our Forum RULES. Don't post a question in the thread of another member -- start your own thread. If you feel it's particularly relevant, provide a link to the other thread.

Closed 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