Here is example demonstrates the "select case" statement.
Private Sub FindDay()
d =Weekday(Date)
Select Case d
Case 1
MsgBox "Sleepy Sunday"
Case 2
MsgBox "Monday again!"
Case 3
MsgBox "Just Tuesday!"
Case 4
MsgBox "Wednesday!"
Case 5
MsgBox "Thursday..."
Case 6
MsgBox "Finally Friday!"
Case else
MsgBox "Super Saturday!!!!"
End Select
End Sub
No comments:
Post a Comment