Link contents of TEXT BOX object to a cell

Bungraman

Board Regular
Joined
May 26, 2010
Messages
126
Hi,

I have tried searching this forum for help, but some members don't clearly explain what they want in their titles :mad:, so it is easier to ask straight out.

I need some help in linking the contents of several Text Box objects to cells. For example, link the contents of Text Box 1 to cell "A5".

How is this achieved, and is the code a macro, or will it sit under the sheet code or workbook?

I know how to link a cell content to a text box by typing the cell in the formula bar when you have the text box selected ie =A5.
Is the reverse this simple?? I have tried entering =Text Box 1 in the cell thinking in line with named cells, but it doesn't work.

Can anyone please help. Thanks
 

Excel Facts

Return population for a City
If you have a list of cities in A2:A100, use Data, Geography. Then =A2.Population and copy down.
Thanks Claymationator, I did find that earlier, I modified it to -

Code:
Sub SetTextBoxValue()
ActiveSheet.Shapes("Text Box 8").Select
Selection.Characters.Text = Range("A8").Value
Range("A8").Select
End Sub

But all it did was cut the text from Text Box 8 and pasted nothing into "A8". What has gone wrong?

oh... and what I need is the textbox contents to be linked to the cells, I think the code above does the opposite.


Bungra
 
Last edited:
Upvote 0

Forum statistics

Threads
1,224,518
Messages
6,179,258
Members
452,901
Latest member
LisaGo

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top