View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Ken Johnson Ken Johnson is offline
external usenet poster
 
Posts: 1,073
Default Confirmation box


Hi Alex,

This is one way...

Public Sub MyMacro()
Dim Check As VbMsgBoxResult
Check = MsgBox("Are you sure you want this macro to run?", vbYesNo)
If Check = vbYes Then
'Code Here
End If
End Sub

Just make sure there is no code between End If and End Sub.

Ken Johnson