VBA: Reverse a string
It is very easy to get the Reverse of a string entered by user in Excel VBA by using VBA inbuilt functionality. strReverse() is the inbuilt function which returns reverse of the String given as input to this function.
strReverse("Your Input String")
Returned Value: It returns a reversed string of your given input String.
Example:Below code will return the Reverse of the String, entered in to A1 Cell in to B1 Cell, on clicking on the CommandButton1.
Private Sub CommandButton1_Click() Range("B1").Value = StrReverse(Range("A1").Value) End Sub
My name is Vishwamitra Mishra. Friends Call me Vishwa. This blog is authored by me. I am an Excel Geek. Well, this blog talks a lot about my passion in Excels & Macros so I’ll not talk about it :) I am very much passionate about traveling & quite recently discovered that I am a good photographer too..:P
AND GET A FREE!
E-BOOK FOR EXCEL VBA BEGINNERS
DON'T MISS ANY NEW ARTICLE !
Get your FREE! E-Book & Have Every New Article Delivered Straight To Your Email-Box