J
James
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
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