本文介绍了如何在vbscript程序中的select case语句中使用value范围?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如何在vbscript程序中的select case语句中使用value范围?
提前感谢...
How to use range of value in select case statement in vbscript program?
thanks in advance...
Dim perc
perc=InputBox("Enter the percenatage:")
Select Case perc
Case 59 To 100
MsgBox "First Class",1,"First Class"
Case 49 To 60
MsgBox "Second Class",1,"Second Class"
Case 39 To 40
MsgBox "May God Save You",1,"Third Class"
Case Else
MsgBox "Gud Luck"
End Select
它无法正常工作?
问候
Chandan
Its not working?
Regards
Chandan
推荐答案
Dim perc
perc=InputBox("Enter the percenatage:")
Select Case True
Case (perc > 59 and prec <= 100)
MsgBox "First Class",1,"First Class"
Case (perc > 49 and prec < 60)
MsgBox "Second Class",1,"Second Class"
Case (perc > 39 and prec < 50)
MsgBox "May God Save You",1,"Third Class"
Case Else
MsgBox "Gud Luck"
End Select
快乐编码!
:)
Happy Coding!
:)
这篇关于如何在vbscript程序中的select case语句中使用value范围?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!