#1   Report Post  
Posted to microsoft.public.excel.misc
Steve
 
Posts: n/a
Default VBA to change font?

I have a workbook with several sheets. I inherited this workbook and it has
multiple fonts. I want code to change all fonts to a common font, say
Verdana or Arial but I want all other formatting to stay the same...like font
size, borders, etc.
  #2   Report Post  
Posted to microsoft.public.excel.misc
Steve
 
Posts: n/a
Default VBA to change font?

Figured it out I think...this seems to work:


Sub set_fonts()

Dim sh As Worksheet

For Each sh In ActiveWorkbook.Worksheets
sh.Activate

Cells.Select
With Selection.Font
.Name = "Verdana"
End With

Next sh
End Sub




"Steve" wrote:

I have a workbook with several sheets. I inherited this workbook and it has
multiple fonts. I want code to change all fonts to a common font, say
Verdana or Arial but I want all other formatting to stay the same...like font
size, borders, etc.

  #3   Report Post  
Posted to microsoft.public.excel.misc
dalsx1
 
Posts: n/a
Default VBA to change font?


How many sheets are you talking about?


--
dalsx1
------------------------------------------------------------------------
dalsx1's Profile: http://www.excelforum.com/member.php...o&userid=33041
View this thread: http://www.excelforum.com/showthread...hreadid=528560

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
can't change font Terri Excel Worksheet Functions 2 December 19th 05 08:15 PM
How do I change the font color based on results of an IF stateme MKLeisure Excel Worksheet Functions 2 December 16th 05 03:53 PM
How to change the default Border, Font Color, and Cell Color Elijah Excel Discussion (Misc queries) 3 November 2nd 05 11:52 PM
change font color of first cell in data table attached to chart momo Charts and Charting in Excel 2 February 18th 05 01:47 AM
Change datalabel font size for all chartobjects in a row Marie J-son Charts and Charting in Excel 2 December 5th 04 07:02 PM


All times are GMT +1. The time now is 12:40 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"