CATEGORIES
How to Write Select Case in VB
Select Case VB
Published by: San (9/20/2007)
Select Case Statement in vb is as like as other programming languages. Select expression holds the variable having the value and case expression list is the use case. Statement is the ToDo when condition satisfies. Multiple cases can be used simultaneously.
Select Case number
Case 1 To 4
Debug.WriteLine("Value between 1 To 4")
Case 5, 6, 7
Debug.WriteLine("Value between 5 To 7")
Case 8 To 10
Debug.WriteLine("Value between 8 To 10")
Case Else
Debug.WriteLine("value not in 1 To 10")
End Select
Example above has a variable called number, once the value is assigned to it then the cases matches with individual numbers. On condition satisfies it prints out the message.
Most Popular Articles
- What is The New Line Characters for ASP and VB
- How to Write Select Case in VB
- VBscript Regex Example to Strip Special Charater in an ASP Page
- How VBScript StrComp Functions Works with ASP Codes
- How to Code and Decode an URL
How to Code and Decode an URL >>
<< How Can I Get a Line Break in My Text Email
COMMENT