The VBA StrReverse Function

Description

The VBA StrReverse function reverses a supplied String.

The syntax of the function is:

StrReverse( Expression )

Where the Expression argument is the String that you want to reverse.


VBA StrReverse Function Example

The following VBA code uses the StrReverse function to reverse a simple String.

' Reverse the String "Test String".
Dim revStr As String
revStr = StrReverse( "Test String" )
' The variable revStr is now equal to "gnirtS tseT".

In the above example, the VBA StrReverse function returns the String "gnirtS tseT"