Solved

Link textbox1 to Range "D3"

Posted on 2012-03-20
10
254 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 46

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
Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
LVL 46

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
 
LVL 46

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 46

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 46

Expert Comment

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

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
MS Excel Multi Sheet Formula 13 35
Excel formula - data format 5 22
Consolidation of Worksheet into a final worksheet 4 41
Word Personalized Watermarks 5 35
This article will guide you to convert a grid from a picture into Excel format using Microsoft OneNote and no other 3rd party application.
Freeze panes is an option within all variants of Excel to enable parts of a sheet to remain stationary when the cursor is in another part of the sheet. This is a very useful feature which is overlooked or under used.
The viewer will learn how to use a discrete random variable to simulate the return on an investment over a period of years, create a Monte Carlo simulation using the discrete random variable, and create a graph to represent the possible returns over…
The viewer will learn how to create a normally distributed random variable in Excel, use a normal distribution to simulate the return on an investment over a period of years, Create a Monte Carlo simulation using a normal random variable, and calcul…

828 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