Copy text from one textbox to another textbox on another sheet

Alstoj79

New Member
Joined
Mar 7, 2018
Messages
22
Hi again all,

This forum is providing me with some great solutions so far but have another dilema.

On Sheet 1 of my workbook I have 2 textboxes and on sheet 2 I have 1 textbox.
Text boxes are named as follows:
Sheet1 Textboxes are TextBox1 and TextBox2
Sheet2 Textbox is TextBox3

All I want to do is populate Sheet2 Textbox3 with whatever I but in Sheet1 TextBox2.

Sounds simple, but I have been having a little trouble understanding other posts and specially when they use abbreviated code!

I understand that there are 2 ways, one through VBA and another through ActivX but haven't got a clue with either currently.

Your help is greatly appreciated.

Thanks
 

Excel Facts

VLOOKUP to Left?
Use =VLOOKUP(A2,CHOOSE({1,2},$Z$1:$Z$99,$Y$1:$Y$99),2,False) to lookup Y values to left of Z values.
you really dont need textboxs on worksheets....a sheet has millions of 'boxes' (cells).
adding an ActiveX just complicates it.
just use cells....sheet1.Range("X4").value = sheet2.Range("X4").value

but..
sheets("sheet2").OLEObjects("TextBox3").Object.Value = sheets("sheet1").OLEObjects("TextBox2").Object.Value
 
Last edited:
Upvote 0
I am assuming these Textboxes are named Ranges; e.g., Textbox1/2/3

With that in mind you could populate Textbox3 with the Formula "=Textbox1"
If it needs to be in VBA you could use the following line in your code:
Code:
Range("Textbox3").Value = Range("Textbox1").Value
 
Upvote 0
When you say:
I understand that there are 2 ways, one through VBA and another through ActivX but haven't got a clue with either currently.

So you have never use a Vba script?

So all you have ever done is formulas?

Not sure how to try to explain all you need to know if you have no ideal what Vba is.
 
Upvote 0
you really dont need textboxs on worksheets....a sheet has millions of 'boxes' (cells).
adding an ActiveX just complicates it.
just use cells....sheet1.Range("X4").value = sheet2.Range("X4").value

but..
sheets("sheet2").OLEObjects("TextBox3").Object.Value = sheets("sheet1").OLEObjects("TextBox2").Object.Value

Thank ranman256, I erally do need text box as its an invoice template and the address need to go in a place where cells can't be aligned to. I will try your code. But where do I out it? new modul? in sheet2? do I need Sub / End Sub?


I am assuming these Textboxes are named Ranges; e.g., Textbox1/2/3

With that in mind you could populate Textbox3 with the Formula "=Textbox1"
If it needs to be in VBA you could use the following line in your code:
Code:
Range("Textbox3").Value = Range("Textbox1").Value
Thank Frank_AL,
I could populate the textbox with that formula, that sounds easy, but how? if I were to type that in to the textbox it just says what I type. Is that activx your talking about???
again the code you have there, where do I put it? New module or in the sheet2 vba window?

When you say:
I understand that there are 2 ways, one through VBA and another through ActivX but haven't got a clue with either currently.

So you have never use a Vba script?

So all you have ever done is formulas?

Not sure how to try to explain all you need to know if you have no ideal what Vba is.


hi My Answer Is This,
Well I sort of know how to manipulate a code but don't know how to start with one. When I said I haven't a clue with either, I meant I haven't a clue how to do this with either!

thanks all
 
Upvote 0
Try this:
Code:
Private Sub CommandButton1_Click()
Sheets(2).TextBox3.Value = Sheets(1).TextBox2.Value
End Sub
 
Upvote 0
When I insert a text box to the worksheet do I just use insert textbox or do I need to insert it through controls on the developer tab (i.e. activex)? I have just been using normal textbox's?
Thanks
 
Last edited:
Upvote 0
In your first post you said:
On Sheet 1 of my workbook I have 2 textboxes and on sheet 2 I have 1 textbox.
Text boxes are named as follows:
Sheet1 Textboxes are TextBox1 and TextBox2
Sheet2 Textbox is TextBox3

So it sounds like to me you already know how to install textboxes.

I know of no way to do it with out using developer.
Then you will have to put this script in a command button.
 
Upvote 0

Forum statistics

Threads
1,223,893
Messages
6,175,241
Members
452,622
Latest member
Laura_PinksBTHFT

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top