change values in multiple text boxes at once

krazykevin76

Board Regular
Joined
Jan 8, 2006
Messages
70
I have a worksheet with 25 text boxes. Each text box contains a formula that references another worksheet cell like "=Sheet1!A5". How can I change all 25 text box formula to say "=Sheet2!A5. Each text box references a different cell, ie A5, A6, A7.......

Find and replace doesn't work. Is there a simple way to do this?


thanks
 

Excel Facts

Show numbers in thousands?
Use a custom number format of #,##0,K. Each comma after the final 0 will divide the displayed number by another thousand
I guess I need to clear up a little. These boxes are actually drawn out rectangles. Not text boxes on a form per say.
 
Upvote 0
Maybe something like this :

Code:
Sub Test()

    Dim oTxtBox As TextBox
    
    For Each oTxtBox In ActiveSheet.TextBoxes
        oTxtBox.Formula = Trim(Replace(oTxtBox.Formula, "1", "2", , 1))
    Next

End Sub
 
Upvote 0

Forum statistics

Threads
1,224,521
Messages
6,179,291
Members
452,902
Latest member
Knuddeluff

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