+ Reply to Thread
Results 1 to 3 of 3

macro "double check"...

Hybrid View

  1. #1
    Registered User
    Join Date
    08-03-2006
    Posts
    12

    Cool macro "double check"...

    I have created a macro to delete entries etc... upon execution. How would I write code to have a "Warning" box pop up to confirm this request and then execute after a Yes / No is clicked?

    Thanks for any help

  2. #2
    Forum Contributor
    Join Date
    11-29-2003
    Posts
    1,203
    Is this what you are looking for?

    Sub doubleCheck()
    
        myChoice = MsgBox("Click OK to continue" & vbLf _
                    & "Click CANCEL to stop now", vbOKCancel, "Are you sure?")
        If myChoice = vbCancel Then Exit Sub
        
        'your other code goes here
    
    End Sub

  3. #3
    Registered User
    Join Date
    08-03-2006
    Posts
    12
    Worked perfect.......Thanks you!

+ 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