Text Box

  • Thread starter Thread starter Greg B
  • Start date Start date
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
 
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
 
Back
Top