Both Replace and InStrRev work fine in my VB6 on at least 3 computers. I
think InStrRev was new in VB6, but I think Replace has been around awhile.
There is also no Reverse in VB5. Long ago I coded the following in VB5 to
replace Reverse and InStrRev:
Public Function InStrReverse(ByVal strText As String, ByVal strSearch As
Optional ByVal intStart As Integer = -1, _
Optional ByVal Mode As VbCompareMethod = vbBinaryCompare) As Integer
' Find index of last occurrence of a search string in a text string.
' Uses Function StrRev.
strText = StrRev(strText)
strSearch = StrRev(strSearch)
If intStart = -1 Then
intStart = Len(strText)
intStart = Len(strText) - intStart + 1
InStrReverse = InStr(intStart, strText, strSearch, Mode)
If InStrReverse = 0 Then Exit Function
InStrReverse = Len(strText) - InStrReverse - Len(strSearch) + 2
Public Function StrRev(ByVal strText As String) As String
' Reverse the characters in a string.
' Used by Function InStrReverse.
Dim intIndex As Integer
intIndex = Len(strText)
StrRev = ""
Do Until intIndex = 0
strText = Left(strText, intIndex)
StrRev = StrRev & Right(strText, 1)
intIndex = intIndex - 1
MVP Directory Services
Hilltop Lab - http://www.yqcomputer.com/