'弹出 YES or NO 的对话框，不同的选择执行不同的代码
On Error Resume Next '防止出现错误
dim intAnswer
intAnswer = Msgbox("Do you want to delete these files?", vbYesNo, "Delete Files") 
If intAnswer = vbYes Then  
Msgbox("You answered yes.") 
Else Msgbox ("You answered no.")  
End If 