请输入星期几(英文的)的第一个字母来判断一下是星期几,如果第一个字母一样,则继续判断第二个字母。
2个回答
展开全部
Sub xq(sql As String)
Select Case UCase(sql)
Case "M"
MsgBox "星期一,下一个星期二"
Case "T"
MsgBox "星期二 or 星期四"
Case "TU", "TUE", "TUES", "TUESD", "TUESDA", "TUESDAY"
MsgBox "星期二,下一个星期三"
Case "TH", "THU", "THUR", "THURS", "THURSD", "THURSDA", "THURSDAY"
MsgBox "星期四,下一个星期五"
Case "W"
MsgBox "星期三,下一个星期四"
Case "F"
MsgBox "星期五,下一个星期六"
Case "S"
MsgBox "星期六 or 星期日"
Case "SA", "SAT", "SATU", "SATUR", "SATURD", "SATURDA", "SATURDAY"
MsgBox "星期六,下一个星期日"
Case "SU", "SUN", "SUND", "SUNDA", "SUNDAY"
MsgBox "星期日,下一个星期一"
Case Else
MsgBox "输入错误"
End Select
End Sub
Select Case UCase(sql)
Case "M"
MsgBox "星期一,下一个星期二"
Case "T"
MsgBox "星期二 or 星期四"
Case "TU", "TUE", "TUES", "TUESD", "TUESDA", "TUESDAY"
MsgBox "星期二,下一个星期三"
Case "TH", "THU", "THUR", "THURS", "THURSD", "THURSDA", "THURSDAY"
MsgBox "星期四,下一个星期五"
Case "W"
MsgBox "星期三,下一个星期四"
Case "F"
MsgBox "星期五,下一个星期六"
Case "S"
MsgBox "星期六 or 星期日"
Case "SA", "SAT", "SATU", "SATUR", "SATURD", "SATURDA", "SATURDAY"
MsgBox "星期六,下一个星期日"
Case "SU", "SUN", "SUND", "SUNDA", "SUNDAY"
MsgBox "星期日,下一个星期一"
Case Else
MsgBox "输入错误"
End Select
End Sub
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询