Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

global text box changes in Excel

71 views
Skip to first unread message

MamaBirdie

unread,
Jan 9, 2006, 11:47:03 AM1/9/06
to
I've downloaded a 12-month-on-1-page 2006 calendar into Excel. Each
individual date is its own text box. I would like to increase the size of
the font for every text box. Is there a way to do it globally or do I have
to change each text box individually?

Chip Pearson

unread,
Jan 9, 2006, 1:13:28 PM1/9/06
to
Try a macro like the following


Sub IncreaseFont()
Dim OLEObj As OLEObject
For Each OLEObj In Worksheets("Sheet1").OLEObjects
With OLEObj
If TypeOf .Object Is MSForms.TextBox Then
.Object.Font.Size = 16 ' whatever font size you want
End If
End With
Next OLEObj
End Sub


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com


"MamaBirdie" <MamaB...@discussions.microsoft.com> wrote in
message
news:B37CDD5E-B071-463F...@microsoft.com...

Gord Dibben

unread,
Jan 9, 2006, 1:40:33 PM1/9/06
to
Mama

Gord Dibben
Dec 20 2005, 10:02 am show options

Newsgroups: microsoft.public.excel.newusers
From: Gord Dibben <gorddibbATshawDOTca> - Find messages by this author
Date: Tue, 20 Dec 2005 10:02:45 -0800
Local: Tues, Dec 20 2005 10:02 am
Subject: Re: how to change font size on calender
Reply | Reply to Author | Forward | Print | Individual Message | Show
original | Report Abuse

Bert


Most of the Calendars from the Template Gallery have the day numbers
inside
individual Text Boxes.


You can manually select these one by one and change the font size or
use a macro to cycle through each box.

For the 2006 12 month per page calendar this code will work.

Sub Change_Font()
Columns("B:H").Select
ActiveSheet.DrawingObjects.Select
For Each TextBox In Selection
With TextBox.Characters(Start:=1, Length:=2).Font
.Name = "Comic Sans MS"
.FontStyle = "Regular"
.Size = 14
.ColorIndex = xlAutomatic
End With
Next
Range("E3").Select
End Sub


Gord Dibben Excel MVP

Gord Dibben MS Excel MVP

0 new messages