I have two stings, Temp1 and Temp2. If I comapre each whole string then I am told they are unequal.
If I cycle through and compare each character with its corresponding chracter in the other string I find that each characted is the same!
I used this:
In the following if statement, the second message box appears:
If temp1 = temp2 Then
MsgBox "Match"
Else
MsgBox "No Match"
End If
In the following loop the second message box appears for each character:
For i = 1 To Len(temp1)
If Mid(temp1, i, 1) <> Mid(temp2, i, 1) Then
MsgBox Mid(temp1, i,1) + "<>" + Mid(temp2, i, 1)
Else
MsgBox Mid(temp1, i,1) + "=" + Mid(temp2, i, 1)
End If
Next i
I have checked, and both strings are the same length. What on earth could possibly cause something like this to happen? As far as I know the two strings are the same!
If I cycle through and compare each character with its corresponding chracter in the other string I find that each characted is the same!
I used this:
In the following if statement, the second message box appears:
If temp1 = temp2 Then
MsgBox "Match"
Else
MsgBox "No Match"
End If
In the following loop the second message box appears for each character:
For i = 1 To Len(temp1)
If Mid(temp1, i, 1) <> Mid(temp2, i, 1) Then
MsgBox Mid(temp1, i,1) + "<>" + Mid(temp2, i, 1)
Else
MsgBox Mid(temp1, i,1) + "=" + Mid(temp2, i, 1)
End If
Next i
I have checked, and both strings are the same length. What on earth could possibly cause something like this to happen? As far as I know the two strings are the same!