Textbox Query

G

Greg

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
 
J

JulieD

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)
 
G

Greg

Thanks Julie,

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

Thanks for the help

Greg
 

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