newbie: Text Box help

doa_aoa
07-18-2003, 06:00 PM
im currently implementing vbasic into a
microsoft word document and i need some help
with text boxes...

is there any way to add multiple text from different sources into the same text box

i dunno how to explain...hmmm

the current code im using is

If ComboBox2.ListIndex = 2 Then
TextBox1.Value = " (text)"
End If

and then....

If ComboBox21.ListIndex = 1 Then
TextBox1.Value = "(Text)"
End If

but each time i tried the entire text box gets cleared and just that data is placed into it and all the other text gets cleared

any help is greatly appreciated
thanks :D

Squishy
07-18-2003, 07:14 PM
Try TextBox1.Value = TextBox1.Value & "(Text)"

blindwig
07-18-2003, 07:15 PM
im currently implementing vbasic into a
microsoft word document and i need some help
with text boxes...

is there any way to add multiple text from different sources into the same text box

i dunno how to explain...hmmm

the current code im using is

If ComboBox2.ListIndex = 2 Then
TextBox1.Value = " (text)"
End If

and then....

If ComboBox21.ListIndex = 1 Then
TextBox1.Value = "(Text)"
End If

but each time i tried the entire text box gets cleared and just that data is placed into it and all the other text gets cleared

any help is greatly appreciated
thanks :D
When you set a textbox.text property, the textbox will only contain the data you give it. If you want to add it on to data that is already in the textbox, then you need to "concatenate" it, such:

Textbox1.Text = Textbox1.text & "some more text"

I predict that you're going to try this and then ask another question. Before you do, here's the answer to that question: ;)

Textbox1.Multiline=true
Textbox1.Text = Textbox1.text & vbNewLine & "some more text"

doa_aoa
07-18-2003, 09:16 PM
woah thanks alot all problems gone...for now 8)

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum