Private Sub cmdHit_Click()
Dim
intHit
As Integer
intHit = Val( InputBox("Enter Hit Type 1-Single 2-Double 3-Triple
4-Homer", _
"Baseball hit type"))
Select Case intHit
Case Is
= 1
MsgBox "Single", vbOKOnly, "1 Base Hit"
Case
Is = 2
MsgBox "Double", vbOKOnly, "2 Base Hit"
Case
Is = 3
MsgBox "Triple", vbOKOnly, "3 Base Hit"
Case
Is = 4
MsgBox "Homer", vbOKOnly, "4 Base Hit“
Case Else
MsgBox "Invalid hit type"
End Select
End Sub |