Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Link textbox1 to Range "D3"

Posted on 2012-03-20
10
Medium Priority
?
275 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
  • 5
  • 3
  • 2
10 Comments
 
LVL 35

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
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
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 35

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

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

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!
This article describes a serious pitfall that can happen when deleting shapes using VBA.
The viewer will learn how to create two correlated normally distributed random variables in Excel, use a normal distribution to simulate the return on different levels of investment in each of the two funds over a period of ten years, and, create a …
Graphs within dashboards are meant to be dynamic, representing data from a period of time that will change each time the dashboard is updated with new data. Rather than update each graph to point to a different set within a static set of data, t…

916 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