Solved

Link textbox1 to Range "D3"

Posted on 2012-03-20
10
228 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 33

Accepted Solution

by:
Norie earned 250 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 45

Assisted Solution

by:Martin Liss
Martin Liss earned 250 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
 
LVL 45

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 33

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
How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

 
LVL 45

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 45

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 45

Expert Comment

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

Featured Post

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

A little background as to how I came to I design this code: Around 5 years ago I designed an add-in that formatted Excel files to a corporate standard, applying different cell colours and font type depending on whether the cells contained inputs,…
Introduction While answering a recent question (http:/Q_27311462.html), I created an alternative function to the Excel Concatenate() function that you might find useful.  I tested several solutions and share the results in this article as well as t…
The viewer will learn how to use the =DISCRINV command to create a discrete random variable, use this command to model a set of probabilities and outcomes in a Monte Carlo simulation, and learn how to find the standard deviation of a set of probabil…
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…

706 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

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now