Dim vResult vResult = MsgBox("Are you sure?", vbYesNo + vbQuestion + vbDefaultButton2 + vbApplicationModal, "Delete file") If vResult = vbNo Then WScript.echo "The file has not been deleted." Else ' put code here to delete the file Wscript.echo "The file has been deleted" End If