Option Compare Text
If you do not worry about the case in comparisons, then use the Option Compare Text for string comparisons based on a case-insensitive text sort order determined by system's locale
Warning: This cannot be set for procedure level. When set, this will be for the entire module
Sub Option_Compare_Statement_Example()
Dim sStr1 As String ' String 1
Dim sStr2 As String ' String 2
' ---------------------------------------------------------------
' Written By Shanmuga Sundara Raman for http://vbadud.blogspot.com
' ---------------------------------------------------------------
sStr1 = "MixedCase"
sStr2 = "mixedcase"
If InStr(1, sStr1, sStr2) Then
MsgBox "Matching!!!"
End If
' ---------------------------------------------------------------
'
' ---------------------------------------------------------------
End Sub
Sunday, April 08, 2007
Error loading feed.
Error loading feed.
Download Windows Live Toolbar and personalize your Web experience! Add custom buttons to get the information you care about most.
Error loading feed.
No comments:
Post a Comment