Hello, How to set the text direction from right to left in Excel using the VBA. Thanks. Regards Odeh
Thanks to John Walkenbach's book: Microsoft Excel 2000 Formulas VB Code: Function REVERSETEXT(text) As String 'Returns its argument, reversed Dim TextLen As Integer Dim i As Integer TextLen = Len(text) For i = TextLen To 1 Step -1 REVERSETEXT = REVERSETEXT & Mid(text, i, 1) Next i End Function Use this in a cell as: =REVERSETEXT(A1) Where A1 would have your text. HTH
Function REVERSETEXT(text) As String 'Returns its argument, reversed Dim TextLen As Integer Dim i As Integer TextLen = Len(text) For i = TextLen To 1 Step -1 REVERSETEXT = REVERSETEXT & Mid(text, i, 1) Next i End Function
If you find any of my posts of good help, please rate it
Many Thanks
Forum Rules