Text Box

G

Greg B

I am needing the code below to be changed so it also shows cell c1 aswell in
the same textbox.

TextBox1.Text = Worksheets("TEAM1").Range("B1").Value

Thanks in advance

Greg
 
G

Guest

Hi,

TextBox1.Text = Worksheets("TEAM1").Range("B1").Value &
Worksheets("TEAM1").Range("C1").Value

B1= "ABC" and C1="XYZ" will show as "ABCXYZ"

If you need a space between them :

TextBox1.Text = Worksheets("TEAM1").Range("B1").Value & " " &
Worksheets("TEAM1").Range("C1").Value

will display "ABC XYZ"

If you want them on separate lines:

Set Multiline property of textbox1 to TRUE (and ensure textbox depth will
show both lines).

TextBox1.Text = Worksheets("TEAM1").Range("B1").Value & vbCRLF &
Worksheets("TEAM1").Range("C1").Value

will show

ABC
XYZ

HTH
XL2003
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top