LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 542
Default Changing font size of cells via VBA code

I am having a problem with Excel hanging up and crashing when executing the
following lines of code. Based upon breakpoints that I have set, it more
specifically looks like it always hangs up on the line of code that changes
the font size.

Does anybody have any insight into why this happens or have any suggestions
of how I can modify my code to keep this from happening?

Thanks,
James

With Selection
.HorizontalAlignment = xlCenter
.VerticalAlignment = True
.MergeCells = True
.Interior.ColorIndex = 4
End With

With Selection.Font
.Name = "Arial"
.FontStyle = "Bold"
.Size = 10
End With

With Selection.Borders
.LineStyle = xlContinuous
.Weight = xlMedium
.ColorIndex = xlAutomatic
End With

Selection.Borders(xlTop).LineStyle = xlNone
 
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
Changing Font color based on font type or size John Excel Discussion (Misc queries) 2 February 7th 08 12:50 AM
Dynamically changing font size of combo box Martin Walke[_2_] Excel Programming 2 January 4th 06 11:51 AM
automatically changing font size Jared Excel Programming 1 January 17th 05 05:22 PM
Changing font size in a list box [email protected] Excel Discussion (Misc queries) 1 December 21st 04 04:07 PM
Changing the font size of the row and column headers Steven Revell Excel Programming 5 October 14th 03 12:33 PM


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