VBA - Fonction d'inversion de chaîne

La fonction StrReverse inverse la chaîne spécifiée.

Syntaxe

StrReverse(string)

Exemple

Ajoutez un bouton et ajoutez la fonction suivante.

Private Sub Constant_demo_Click()
   msgbox("Line 1 : " & StrReverse("VBSCRIPT"))
   msgbox("Line 2 : " & StrReverse("My First VBScript"))
   msgbox("Line 3 : " & StrReverse("123.45"))
End Sub

Lorsque vous exécutez la fonction ci-dessus, elle produit la sortie suivante.

Line 1 : TPIRCSBV
Line 2 : tpircSBV tsriF yM
Line 3 : 54.321