I like to make text art and know you can invert/flip horzitonaly a picture but is it possible to invert/flip horzitonal:
\\\\\\\\\\\\\\\\\
to:
/////////////////
123456789
987654321
or any other characters
Thanks in advanced!
Printable View
I like to make text art and know you can invert/flip horzitonaly a picture but is it possible to invert/flip horzitonal:
\\\\\\\\\\\\\\\\\
to:
/////////////////
123456789
987654321
or any other characters
Thanks in advanced!
You can use StrRev() to reverse a string. It won't do anything with "\\\\\" though. You'd have to replace() "\" with "/" for that.
VB Code:
text1.text = StrRev(text1.text)
Text2.Text = StrReverse(Text1.Text)
InStrRev is the same as InStr, just it goes from right to left to find the specified string in a given string.Quote:
Originally Posted by dglienna
I think you meant to say StrReverse
With StrReverse I get some messed up display:
a54321fedcba987654321fedc
a
In the textbox it displays as: a54321fedcba987654321fedca
when it should say: a54321fedcba987654321fedc without a
On the line it displays the lettter of the next line on the previous line
Oops. You're right. Thanks.Quote:
Originally Posted by baja_yu
EDITED: Corrected.
Post your code. You must have a crlf in the data.Quote:
Originally Posted by articwoof
A vbCrLf (enter) is a combination of 2 characters in windows chr(13)+chr(10). So when you do StrReverse, you make it chr(10)+chr(13)
The following code would work correctly.
VB Code:
Text2.Text = Replace(StrReverse(Text1.Text), vbLf & vbCr, vbCrLf)