Formating All Text Boxes

deftones

New Member
Joined
Oct 27, 2010
Messages
10
So, this is pretty much a newbie question, but I have a spreadsheet with exactly 4 textboxes per tab, with about 15 tabs. I want to change the font style of all text boxes to the same style. I'm trying to keep my code somewhat efficient; isn't there a quick way to do this? I have a loop that's doing some different formatting on each sheet, so I just wanted to add something like this at the bottom.

With ActiveSheet.TextBoxes(4)
.Font.Bold=True
' etc.
End With
 

Excel Facts

Excel Joke
Why can't spreadsheets drive cars? They crash too often!
Something like this, maybe:
Code:
        For Each tb In ActiveSheet.OLEObjects
            tb.Object.FontName = "Arial"
            tb.Object.FontBold = True
        Next
... which will change all ActiveX objects. Or are there other objects in the sheets that you don't want to process?
 
Upvote 0

Forum statistics

Threads
1,214,606
Messages
6,120,497
Members
448,967
Latest member
visheshkotha

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