ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Textbox Query (https://www.excelbanter.com/excel-programming/326534-textbox-query.html)

Greg[_20_]

Textbox Query
 
TextBox1.Text = Worksheets("R2").Range("A1").Value

I am using the code above to get text on to a userform how can i change this
to get the information from cell "b1" as well in this same textbox?

Thanks

Greg



JulieD

Textbox Query
 
Hi Greg

do you want to add (+) the value in A1 with the value in B1 or concatenate
it?

to add use
TextBox1.Text = Worksheets("R2").Range("A1").Value +
Worksheets("R2").Range("B1").Value

to concatenate use
TextBox1.Text = Worksheets("R2").Range("A1").Value &
Worksheets("R2").Range("B1").Value

Cheers
JulieD
(you're working late)

"Greg" wrote in message
...
TextBox1.Text = Worksheets("R2").Range("A1").Value

I am using the code above to get text on to a userform how can i change
this
to get the information from cell "b1" as well in this same textbox?

Thanks

Greg





Greg[_20_]

Textbox Query
 
Thanks Julie,

Yeah I should go to bed but I am writing this program for my sister to use

Thanks for the help

Greg



JulieD

Textbox Query
 
where in Oz?

"Greg" wrote in message
...
Thanks Julie,

Yeah I should go to bed but I am writing this program for my sister to use

Thanks for the help

Greg





Greg[_20_]

Textbox Query
 
Adelaide.




JulieD

Textbox Query
 
perth ... and it's 2am here !!!!

"Greg" wrote in message
...
Adelaide.







All times are GMT +1. The time now is 02:07 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com