Microsoft Excel Question:
Download Job Interview Questions and Answers PDF
Can I ask my user for confirmation before executing the macro?
![MS Excel Interview Answer MS Excel Interview Question](https://globalguideline.com/public/images/interview/17.png)
Answer:
Sub AskAndDo()
If MsgBox("Are you sure ?", vbYesNo + vbQuestion) = vbNo _
Then Exit Sub
'Code goes here instead of
MsgBox "Actions here"
End Sub
If MsgBox("Are you sure ?", vbYesNo + vbQuestion) = vbNo _
Then Exit Sub
'Code goes here instead of
MsgBox "Actions here"
End Sub
Download MS Excel Interview Questions And Answers
PDF