insert text in a sheet textbox

Av8tordude

Well-known Member
Joined
Oct 13, 2007
Messages
974
i have a textbox located on a sheet (Named: Version). Each time A1 is updated with a new number, I have to change the text in the textbox also. Can someone assist me with a macro that will automatically change the text in the textbox to the value in cell A1.

Thanks for you help
 

Excel Facts

When did Power Query debut in Excel?
Although it was an add-in in Excel 2010 & Excel 2013, Power Query became a part of Excel in 2016, in Data, Get & Transform Data.

Marcelo Branco

MrExcel MVP
Joined
Aug 23, 2010
Messages
16,868
Office Version
  1. 2019
  2. 2010
Platform
  1. Windows
Hi,

I think you can use the LinkedCell property assigning it to A1.

If you have already assigned a LinkedCell and cannot change it, maybe this

Code:
Private Sub Worksheet_Change(ByVal Target As Range)
    If Not Intersect(Target, Range("A1")) Is Nothing Then
        TextBox1.Value = Range("A1")
    End If
End Sub

HTH

M.
 

Av8tordude

Well-known Member
Joined
Oct 13, 2007
Messages
974
Hi,

I think I might have used the wrong terminology. The textbox is not like a userform textbox , but a Box that you right-click inside to insert text.

Thanks
 

Marcelo Branco

MrExcel MVP
Joined
Aug 23, 2010
Messages
16,868
Office Version
  1. 2019
  2. 2010
Platform
  1. Windows
Well, sorry but i never heard about a Box like this. How did you create it?

M.
 

Fazza

MrExcel MVP
Joined
May 17, 2006
Messages
9,368
hi, Select the text box and then in the formula bar enter =A1, then return. HTH
 

Forum statistics

Threads
1,141,728
Messages
5,708,134
Members
421,548
Latest member
douae

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
Top