Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Link textbox1 to Range "D3"

Posted on 2012-03-20
10
Medium Priority
?
270 Views
Last Modified: 2012-03-29
Hi guys, how can I link data in textbox 1 to Range("D3")

Thank you
0
Comment
Question by:rsen1
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 5
  • 3
  • 2
10 Comments
 
LVL 34

Accepted Solution

by:
Norie earned 1000 total points
ID: 37743276
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
 
LVL 49

Assisted Solution

by:Martin Liss
Martin Liss earned 1000 total points
ID: 37743302
With the textbox selected enter =D3 in the formula bar.
0
 

Author Comment

by:rsen1
ID: 37743563
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
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 
LVL 49

Expert Comment

by:Martin Liss
ID: 37777535
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
 
LVL 34

Expert Comment

by:Norie
ID: 37777640
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
 
LVL 49

Expert Comment

by:Martin Liss
ID: 37777729
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
 

Author Comment

by:rsen1
ID: 37780007
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
 
LVL 49

Expert Comment

by:Martin Liss
ID: 37780098
So since we helped are you going to assign points?
0
 

Author Comment

by:rsen1
ID: 37780227
The points were assigned yesterday, I split them
0
 
LVL 49

Expert Comment

by:Martin Liss
ID: 37781953
Thanks, and my apologies, I didn't notice.
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Do you use a spreadsheet like Microsoft's Excel?  Have you ever wanted to link out to a non excel file on your computer or network drive?  This is the way I found to do it!
You need to know the location of the Office templates folder, so that when you create new templates, they are saved to that location, and thus are available for selection when creating new documents.  The steps to find the Templates folder path are …
This Micro Tutorial demonstrates how to create Excel charts: column, area, line, bar, and scatter charts. Formatting tips are provided as well.
This Micro Tutorial will demonstrate how to use a scrolling table in Microsoft Excel using the INDEX function.

715 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question