Transfering Text from and Activex Textbox in one sheet to another Activex Textbox in another sheet

Mcfg007

New Member
Joined
Mar 10, 2018
Messages
45
Hello

I am looking to transfer text from an Activex Textbox in one sheet to another Activex Textbox in another sheet?

Can anyone help?

Many thanks
 

Excel Facts

Last used cell?
Press Ctrl+End to move to what Excel thinks is the last used cell.
I am looking to transfer text from an Activex Textbox in one sheet to another Activex Textbox in another sheet?
Assuming your TextBoxes are both named TextBox1 on their respective sheets, and assuming these TextBoxes are located on Sheet1 and Sheet2, put this line of code in your macro...

Sheets("Sheet1").TextBox1.Value = Sheets("Sheet2").TextBox1.Value
 
Upvote 0
I was trying not use macro. I opened designed mode on the sheet I want the text transferred to and entered the code below but it did not work.

Private Sub TextBox3_Change()
Sheets("Case Details").TextBox1.Text = TextBox3.Text
End Sub
 
Upvote 0
Rick, It does seam to work, what am I doing wrong here?

This is the code I have entered:

Private Sub TextBox3_Change()
Sheets("Case Details").TextBox1.Value = Sheets("C&I Report").TextBox3.Value
End Sub


also tried with no avail

Private Sub TextBox3_Change()
Sheets("Case Details").TextBox1.Text = Sheets("C&I Report").TextBox3.Text
End Sub
 
Upvote 0
I was trying not use macro. I opened designed mode on the sheet I want the text transferred to and entered the code below but it did not work.

Private Sub TextBox3_Change()
Sheets("Case Details").TextBox1.Text = TextBox3.Text
End Sub
I'm about to go to sleep, so I won't be available for awhile, but the code worked for me. Not sure what you meant by "opened designed mode on the sheet I want the text transferred to"... you should be putting the code in the code module for the worksheet containing the TextBox you are typing into (that is, the sheet containing TextBox3).
 
Upvote 0
I want to my original Sheet" (called "Case Details") copy or link the text to my second Sheet3 (called "C&I Reports"). I double clicked on the Sheet3 Textbox3 and got into the VBA window. On sheet3 (called "C&I Report") Textbox 3 I entered that code and selected change from the right top drop down option.

Private Sub TextBox3_Change()
Sheets("Case Details").TextBox1.Text = Sheets("C&I Report").TextBox3.Text
End Sub

also tried

Private Sub TextBox3_Change()
Sheets("Case Details").TextBox1.Value = Sheets("C&I Report").TextBox3.Value
End Sub

Saved, but nothing happened.
 
Upvote 0
Rick is there anyway I can send you the Excel sheet for you to check? I just want to populate Sheet3 Textbox1 with the text from Sheet2 Textbox1. Many thanks Manny
 
Upvote 0
Rick is there anyway I can send you the Excel sheet for you to check? I just want to populate Sheet3 Textbox1 with the text from Sheet2 Textbox1. Many thanks Manny
Since you want to type into the TextBox on Sheet2, double click that TextBox (while in Design Mode) and copy/paste this code into the Sheet2 code module that opened up...
Code:
Private Sub TextBox1_Change()
  Application.EnableEvents = False
  Sheets("Sheet3").TextBox1.Value = TextBox1.Value
  Application.EnableEvents = True
End Sub
As you type into the TextBox on Sheet2, the TextBox on Sheet3 will mirror the text you type.
 
Upvote 0
Hi Rick,

Apologies but it does not seam to work. Now I get and error

As soon as I type any thing on Textbox1 from Sheet 2 a Window shows up with an error.

Run-Time Error "9"
Subscript out of range
 
Last edited:
Upvote 0
Hi Rick,

Apologies but it does not seam to work. Now I get and error

As soon as I type any thing on Textbox1 from Sheet 2 a Window shows up with an error.

Run-Time Error "9"
Subscript out of range
Sorry, I forgot to change my test sheet name (Sheet3) to your actual sheet name (). In the code below, you need to change the Sheet3 to your sheet's actual name.
Code:
[CODE]Private Sub TextBox1_Change()
  Application.EnableEvents = False
  Sheets("[B][COLOR="#FF0000"]Sheet3[/COLOR][/B]").TextBox1.Value = TextBox1.Value
  Application.EnableEvents = True
End Sub
[/CODE]
 
Upvote 0

Forum statistics

Threads
1,224,822
Messages
6,181,164
Members
453,021
Latest member
Justyna P

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