Answers

Question and Answer:

  Home  MS Excel

⟩ Can I ask my user for confirmation before executing the macro?

Sub AskAndDo()

If MsgBox("Are you sure ?", vbYesNo + vbQuestion) = vbNo _

Then Exit Sub

'Code goes here instead of

MsgBox "Actions here"

End Sub

 234 views

More Questions for you: