I have a simple script which takes two strings and compare them. The first one has a space at the end and the second does not have that.
Function compare(str1,str2)
dim a
If strComp(trim(str1),trim(str2))=0 Then
msgbox "OK"
a=1
Else
msgbox "KO"
a=0
End If
compare=a
End Function
I use this function in this way:
s1= SUCCESSFULLY CONNECTED
s2= SUCCESSFULLY CONNECTED
result=compare(s1,s2)
The difference between s1 and s2 is that s1 ends with a single space while s2 does not have any space at the end. This why I use the Trim function to ignore that space. Despite that, for s1 and s2, I always get the message "KO" in dialog box. I have even changed the condition by
If trim(str1)=trim(str2) Then
But popup is still returned "KO". This is a wonderful situation!
Please, I'm tired of that and hope that you help understand this situation. Thank you in advance