Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 50
Default change txtbx font

I have a workbook with 13 sheets, each sheet has 25 to 30 textboxes.
I would like to run a macro that will search the sheets, find the textboxes
and change the font size. As usual I have had no luck coming up with one on
my own.
Can anyone help?

Thanks
CR


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default change txtbx font

What kind of Textboxes

for activeX textboxes

Sub AAAA()
Dim oObj As OLEObject
For Each oObj In ActiveSheet.OLEObjects
If TypeOf oObj.Object Is MSForms.TextBox Then
oObj.Object.Font.Size = 12
End If
Next

End Sub


--
Regards,
Tom Ogilvy



"CR" wrote in message
...
I have a workbook with 13 sheets, each sheet has 25 to 30 textboxes.
I would like to run a macro that will search the sheets, find the

textboxes
and change the font size. As usual I have had no luck coming up with one

on
my own.
Can anyone help?

Thanks
CR




  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default change txtbx font

If perchance they are drawing object textboxes then you could use

Sub BBBB()
Dim oObj As Shape
For Each oObj In ActiveSheet.Shapes
If oObj.Type = msoTextBox Then
oObj.Select
Selection.Font.Size = 12
End If
Next

End Sub


--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)

"Tom Ogilvy" wrote in message
...
What kind of Textboxes

for activeX textboxes

Sub AAAA()
Dim oObj As OLEObject
For Each oObj In ActiveSheet.OLEObjects
If TypeOf oObj.Object Is MSForms.TextBox Then
oObj.Object.Font.Size = 12
End If
Next

End Sub


--
Regards,
Tom Ogilvy



"CR" wrote in message
...
I have a workbook with 13 sheets, each sheet has 25 to 30 textboxes.
I would like to run a macro that will search the sheets, find the

textboxes
and change the font size. As usual I have had no luck coming up with one

on
my own.
Can anyone help?

Thanks
CR






  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,824
Default change txtbx font

And without the selecting:

Option Explicit
Sub BBBB2()
Dim oObj As Shape
For Each oObj In ActiveSheet.Shapes
If oObj.Type = msoTextBox Then
oObj.DrawingObject.Font.Size = 12
End If
Next oObj
End Sub

And just using the textbox collection.
Sub ccccc()
Dim myTB As TextBox
Dim wks As Worksheet
For Each wks In ActiveWorkbook.Worksheets
For Each myTB In ActiveSheet.TextBoxes
myTB.Font.Size = 12
Next myTB
Next wks
End Sub

And I could even get them all at once:

Sub ccccc2()
Dim wks As Worksheet
For Each wks In ActiveWorkbook.Worksheets
wks.TextBoxes.Font.Size = 12
Next wks
End Sub

Bob Phillips wrote:

If perchance they are drawing object textboxes then you could use

Sub BBBB()
Dim oObj As Shape
For Each oObj In ActiveSheet.Shapes
If oObj.Type = msoTextBox Then
oObj.Select
Selection.Font.Size = 12
End If
Next

End Sub

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)

"Tom Ogilvy" wrote in message
...
What kind of Textboxes

for activeX textboxes

Sub AAAA()
Dim oObj As OLEObject
For Each oObj In ActiveSheet.OLEObjects
If TypeOf oObj.Object Is MSForms.TextBox Then
oObj.Object.Font.Size = 12
End If
Next

End Sub


--
Regards,
Tom Ogilvy



"CR" wrote in message
...
I have a workbook with 13 sheets, each sheet has 25 to 30 textboxes.
I would like to run a macro that will search the sheets, find the

textboxes
and change the font size. As usual I have had no luck coming up with one

on
my own.
Can anyone help?

Thanks
CR





--

Dave Peterson

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 50
Default change txtbx font

I'm Sorry, they are textboxes from the Drawing toolbar

Thanks
CR


"Tom Ogilvy" wrote in message
...
What kind of Textboxes

for activeX textboxes

Sub AAAA()
Dim oObj As OLEObject
For Each oObj In ActiveSheet.OLEObjects
If TypeOf oObj.Object Is MSForms.TextBox Then
oObj.Object.Font.Size = 12
End If
Next

End Sub


--
Regards,
Tom Ogilvy



"CR" wrote in message
...
I have a workbook with 13 sheets, each sheet has 25 to 30 textboxes.
I would like to run a macro that will search the sheets, find the

textboxes
and change the font size. As usual I have had no luck coming up with one

on
my own.
Can anyone help?

Thanks
CR








  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default change txtbx font

then see my response.

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)

"CR" wrote in message
...
I'm Sorry, they are textboxes from the Drawing toolbar

Thanks
CR


"Tom Ogilvy" wrote in message
...
What kind of Textboxes

for activeX textboxes

Sub AAAA()
Dim oObj As OLEObject
For Each oObj In ActiveSheet.OLEObjects
If TypeOf oObj.Object Is MSForms.TextBox Then
oObj.Object.Font.Size = 12
End If
Next

End Sub


--
Regards,
Tom Ogilvy



"CR" wrote in message
...
I have a workbook with 13 sheets, each sheet has 25 to 30 textboxes.
I would like to run a macro that will search the sheets, find the

textboxes
and change the font size. As usual I have had no luck coming up with

one
on
my own.
Can anyone help?

Thanks
CR








  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 50
Default change txtbx font

Sorry Bob, must be my server or something but all I see for this thread is
Tom's post, the two from me and this one from you. Would you mind reposting?

Thanks
CR



"Bob Phillips" wrote in message
...
then see my response.

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)

"CR" wrote in message
...
I'm Sorry, they are textboxes from the Drawing toolbar

Thanks
CR


"Tom Ogilvy" wrote in message
...
What kind of Textboxes

for activeX textboxes

Sub AAAA()
Dim oObj As OLEObject
For Each oObj In ActiveSheet.OLEObjects
If TypeOf oObj.Object Is MSForms.TextBox Then
oObj.Object.Font.Size = 12
End If
Next

End Sub


--
Regards,
Tom Ogilvy



"CR" wrote in message
...
I have a workbook with 13 sheets, each sheet has 25 to 30 textboxes.
I would like to run a macro that will search the sheets, find the
textboxes
and change the font size. As usual I have had no luck coming up with

one
on
my own.
Can anyone help?

Thanks
CR










  #8   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,824
Default change txtbx font

How about using google:

http://groups.google.com/groups?thre...C9C8%40msn.com



CR wrote:

Sorry Bob, must be my server or something but all I see for this thread is
Tom's post, the two from me and this one from you. Would you mind reposting?

Thanks
CR

"Bob Phillips" wrote in message
...
then see my response.

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)

"CR" wrote in message
...
I'm Sorry, they are textboxes from the Drawing toolbar

Thanks
CR


"Tom Ogilvy" wrote in message
...
What kind of Textboxes

for activeX textboxes

Sub AAAA()
Dim oObj As OLEObject
For Each oObj In ActiveSheet.OLEObjects
If TypeOf oObj.Object Is MSForms.TextBox Then
oObj.Object.Font.Size = 12
End If
Next

End Sub


--
Regards,
Tom Ogilvy



"CR" wrote in message
...
I have a workbook with 13 sheets, each sheet has 25 to 30 textboxes.
I would like to run a macro that will search the sheets, find the
textboxes
and change the font size. As usual I have had no luck coming up with

one
on
my own.
Can anyone help?

Thanks
CR









--

Dave Peterson

  #9   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default change txtbx font

This is Bob's response



If perchance they are drawing object textboxes then you could use

Sub BBBB()
Dim oObj As Shape
For Each oObj In ActiveSheet.Shapes
If oObj.Type = msoTextBox Then
oObj.Select
Selection.Font.Size = 12
End If
Next

End Su

--
Message posted from http://www.ExcelForum.com

  #10   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 50
Default change txtbx font

Doh, that worked. And so did both replies.

Thanks All



"Dave Peterson" wrote in message
...
How about using google:

http://groups.google.com/groups?thre...C9C8%40msn.com



CR wrote:

Sorry Bob, must be my server or something but all I see for this thread

is
Tom's post, the two from me and this one from you. Would you mind

reposting?

Thanks
CR

"Bob Phillips" wrote in message
...
then see my response.

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)

"CR" wrote in message
...
I'm Sorry, they are textboxes from the Drawing toolbar

Thanks
CR


"Tom Ogilvy" wrote in message
...
What kind of Textboxes

for activeX textboxes

Sub AAAA()
Dim oObj As OLEObject
For Each oObj In ActiveSheet.OLEObjects
If TypeOf oObj.Object Is MSForms.TextBox Then
oObj.Object.Font.Size = 12
End If
Next

End Sub


--
Regards,
Tom Ogilvy



"CR" wrote in message
...
I have a workbook with 13 sheets, each sheet has 25 to 30

textboxes.
I would like to run a macro that will search the sheets, find

the
textboxes
and change the font size. As usual I have had no luck coming up

with
one
on
my own.
Can anyone help?

Thanks
CR









--

Dave Peterson



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
macro that will change the font of a cell if i change a value jk Excel Discussion (Misc queries) 2 July 29th 08 04:39 PM
change scaling % but font size didnt change porportionally, pls he Scaling question Excel Discussion (Misc queries) 0 March 12th 07 03:16 AM
Change all text one font size up with various font sizes used. omchrystal New Users to Excel 2 March 6th 07 09:01 PM
Highlight entire document and try to change font - won't change. murzy03 Excel Discussion (Misc queries) 1 May 8th 06 07:05 PM
change display font to actual selected font Flannigan Excel Discussion (Misc queries) 1 August 30th 05 01:46 PM


All times are GMT +1. The time now is 05:38 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"