Link textbox1 to Range "D3"

Hi guys, how can I link data in textbox 1 to Range("D3")

Thank you
rsen1Asked:
Who is Participating?
 
NorieVBA ExpertCommented:
Select the textbox, goto the formula bar and enter =D3.

That assumes it's a textbox 'shape'.

If it's an ActiveX textbox right click it, select Properties and set the LinkedCell property to D3.
0
 
Martin LissOlder than dirtCommented:
With the textbox selected enter =D3 in the formula bar.
0
 
rsen1Author Commented:
Thank you for your response,

Maybe I asked the question wrong, please see attached. I need the range D3 to equal the contents of the textbox
textbox.xlsx
0
Cloud Class® Course: MCSA MCSE Windows Server 2012

This course teaches how to install and configure Windows Server 2012 R2.  It is the first step on your path to becoming a Microsoft Certified Solutions Expert (MCSE).

 
Martin LissOlder than dirtCommented:
If the text in the textbox will always start with "Name: " (that's Name: followed by a space) then

In VBA do this


Private Sub TextBox1_Change()
Range("D3").Value = Split(TextBox1.Text, ": ")(1)
End Sub
0
 
NorieVBA ExpertCommented:
In the workbook it's an ActiveX textbox, not a Forms texbox, so what's been posted won't work.

What exactly do you want to appear where and when?

If you want the value typed in D3 to appear in the textbox you can set the textbox's LinkedCell property to D3.

That will only put what's in D3 in the textbox, it won't add any sort of prefix.
0
 
Martin LissOlder than dirtCommented:
I believe he wants the name that's typed in the textbox to appear in D3. eg if "Name: Marty" is in the textbox then D3 should be 'Marty'.
0
 
rsen1Author Commented:
Guys, thank you very much for you suggestions, they were a great help.

The code that worked for me

Private Sub CommandButton1_Click()
Range("H10").Value = TextBox1.Text
End Sub
0
 
Martin LissOlder than dirtCommented:
So since we helped are you going to assign points?
0
 
rsen1Author Commented:
The points were assigned yesterday, I split them
0
 
Martin LissOlder than dirtCommented:
Thanks, and my apologies, I didn't notice.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.