VBA - StrReverse 函数

StrReverse 函数反转指定的字符串。

语法

StrReverse(string) 

示例

添加一个按钮并添加以下功能。

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

当您执行上述函数时,它会产生以下输出。

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

❮ vba_strings.html