Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Format Text Strings

Status
Not open for further replies.

Mungovan

Programmer
Oct 24, 2002
94
IE
Hi,
I need to format a bunch of text strings so that they're tabbed apart.

That is:

<<
Dim myString as String

myString = &quot;Value 1 is:&quot; tabbed & textBox1

>>

Is there a way of &quot;returning&quot; a string as well? I.e


<<
Dim myString as String

myString = &quot;Value 1 is:&quot; returned & textBox1

>>

Thanks,
D
 
Hi,

Did you try using the vbTab character (ascii 9) to separate the strings? It will add a tab but won't guarantee that everything lines up, it depends on the length of each string, a bit like using the Tab key to line things up in a word processor.

- Andy
_______________________________
&quot;On a clear disk you can seek forever&quot;
 
I think this might work

myString = &quot;Value 1 is:&quot; & vbTab & textBox1

make sure that multiline is set to true in any text box that uses that string.
 
myString = &quot;Value 1 is:&quot; & vbTab & textBox1.text

myString = &quot;Value 1 is:&quot; & vbNewLine & textBox1.Text
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top