vb upper case code example
Example 1: vb switch case
Dim number As Integer = 8
Select Case number
Case 1 To 5
Debug.WriteLine("Between 1 and 5, inclusive")
Case 6, 7, 8
Debug.WriteLine("Between 6 and 8, inclusive")
Case 9 To 10
Debug.WriteLine("Equal to 9 or 10")
Case Else
Debug.WriteLine("Not between 1 and 10, inclusive")
End Select
Example 2: vba ignore case
Option Compare Text
Option Compare Binary
Debug.Print StrComp(string1, string2, vbUseCompareOption)
Debug.Print StrComp(string1, string2, vbBinaryCompare)
Debug.Print StrComp(string1, string2, vbTextCompare)