I would recommend create a function call to remove all extra non printable characters then also change StrComp to use text compare instead of binary so the system does not have to convert every thing to lower case. Here is an example.
Function RmExtra(myString)
myString=Replace(myString,vbCr,'''')
myString=Replace(myString,vbLf ,'''')
myString=Replace(myString,vbTab ,'''')
myString=Replace(myString,vbFormFeed ,'''')
myString=Replace(myString,vbTab ,'''')
myString=Replace(myString,'' '' ,'''') ' for a space
RmExtra=myString
End Function
aaa =''TestTEST''
bbb=''TEST''& vbCr & ''TEST'' & vbCr
ccc=bbb
ccc=RmExtra(ccc)
MsgBox ''aaa='' & aaa &''*''
MsgBox ''bbb='' & bbb &''*''
MsgBox ''ccc='' & ccc &''*''
'This works as a text compare and does not worry about case
r1 =StrComp(aaa,ccc,1)
MsgBox ''opt1='' & r1
'This does not work because it is a binary compare
r0 =StrComp(aaa,ccc,0)
MsgBox ''opt0='' & r0