Home > Software engineering >  Questions about the select case
Questions about the select case

Time:10-28

Sub test ()
Dim As Integer I
Dim k As String

I=3
K="OK"

Select a Case I

Case 0 Or 3
MsgBox "Yes"
In Case the Else
MsgBox "No"
End the Select

The Select Case k
Case "OK" Or "Good" 'run to come here to make a mistake, prompt type does not match the
MsgBox "k is OK"
In Case the Else
MsgBox "k is not OK
"End the Select

End Sub

Please help see
  •  Tags:  
  • VBA
  • Related