Info

MyMsg = "Do you want to Continue?"

Response = MsgBox(myMsg, vbExclamation + vbYesNoCancel, myTitle) Select Case Response Case Is = vbYes

ActiveWorkbook.Close SaveChanges:=False Case Is = vbNo

ActiveWorkbook.Close SaveChanges:=True Case Is = vbCancel

MyMsg = "Do you want to Continue?"

Response = MsgBox(myMsg, vbExclamation + vbYesNoCancel, myTitle) Select Case Response Case Is = vbYes

ActiveWorkbook.Close SaveChanges:=False Case Is = vbNo

ActiveWorkbook.Close SaveChanges:=True Case Is = vbCancel

Exit End Select

Figure 9.2

A MsgBox can be used to display information and obtain a basic response from the user.

Figure 9.2

A MsgBox can be used to display information and obtain a basic response from the user.

0 0

Post a comment