Error Checking in Excel
Thanks Thanks:  0
Likes Likes:  0
Results 1 to 3 of 3

Thread: yes / no to continue macro

  1. #1
    Board Regular
    Join Date
    Apr 2002
    Posts
    237
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    Is there a way to bring up a yes / no box to stop or continue a macro?

  2. #2
    Board Regular
    Join Date
    Mar 2002
    Location
    =ActiveCell.Address
    Posts
    478
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default


    A simple message box should do the trick, i.e.

    Sub continue()

    CarryOn = MsgBox("Do you wanna carry on?", vbYesNo, "Continue?")

    If CarryOn = vbYes Then
    'put rest of code here

    End If

    End sub

  3. #3
    Board Regular
    Join Date
    Mar 2002
    Posts
    363
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    Sub Yes_No_Msg()
    ans = MsgBox("Your Question Here?", vbYesNo)
    If ans = vbYes Then
    'Yes your code here
    Else
    'No your code here
    End If
    End Sub

    It's never too late to learn something new.

    Ricky

Some videos you may like

User Tag List

Like this thread? Share it with others

Like this thread? Share it with others

Posting Permissions

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