View Single Post
  #9   Report Post  
Posted to microsoft.public.excel.programming
Stefi Stefi is offline
external usenet poster
 
Posts: 2,646
Default find first o from right

Hi Delmac,

Public Function ByteReverse(InputString) As String
Dim InputString As String OMIT THIS LINE
Dim i As Long
Dim ByteStr, ResultStr As String
ResultStr = ""
For i = Len(InputString) To 1 Step -1
ByteStr = Mid(InputString, i, 1)
ResultStr = ResultStr & ByteStr
Next i
ByteReverse = ResultStr
End Functio


This code must work if you place it in a normal module:

Public Function ByteReverse(InputString) As String
Dim i As Long
Dim ByteStr, ResultStr As String
ResultStr = ""
For i = Len(InputString) To 1 Step -1
ByteStr = Mid(InputString, i, 1)
ResultStr = ResultStr & ByteStr
Next i
ByteReverse = ResultStr
End Function

If it doesn't work, post your workbook to me to this address:


Regards,
Stefi