Example - OptionCompare Statement
This example uses the StrComp method to compare the strings. It results in a value of -1 to indicate that the strings "3 A" and "3- B" are not identical.
OptionCompare Text
Sub Main()
Dim i As Integer
i = StrComp("3 A", "3- B", vbTextCompare)
MsgBox i
End Sub
If you change both strings to be the same, this returns 0 to indicate they are identical.