Function ReverseString(linea As String) As String
'This procedure produces a reversal of
'an inputted string.
Dim result As String, i As Integer, n As Integer
n = Len(linea)
result = ""
For i = n To 1 Step -1
result = result & Mid(linea, i, 1)
Next i
ReverseString = result
Debug.Print linea & " reversed = " & result
End Function