EXcel 2003. I run a macro each day as I have for many months, on a large sheet, 15,000 rows, 50 columns. It just reformats the text, changes the width of columns, adds a bit of conditional formatting etc., nothing sophisticated. The sheet is generated overnight from a SQL database.
Yesterday the macro stopped, 'Code Execution hs been interrupted.' I selected 'Continue' and all was OK. Today it was interrupted several times as above, but still ran OK. Clearly something is wrong, but I've no idea what. The first interruption is on the line below, .Name = "Courier"
This is the first dozen or so lines. Any help will be most welcome. The highlighted line changes the font from Arial to Courier.
ActiveWindow.DisplayGridlines = True
'
Rows("1:1").Select
Selection.Delete Shift:=xlUp
Cells.Select
With Selection.Font
.Name = "Courier"
.Size = 10
.Strikethrough = False
.Superscript = False
.Subscript = False
.OutlineFont = False
.Shadow = False
.Underline = xlUnderlineStyleNone
End With
Yesterday the macro stopped, 'Code Execution hs been interrupted.' I selected 'Continue' and all was OK. Today it was interrupted several times as above, but still ran OK. Clearly something is wrong, but I've no idea what. The first interruption is on the line below, .Name = "Courier"
This is the first dozen or so lines. Any help will be most welcome. The highlighted line changes the font from Arial to Courier.
ActiveWindow.DisplayGridlines = True
'
Rows("1:1").Select
Selection.Delete Shift:=xlUp
Cells.Select
With Selection.Font
.Name = "Courier"
.Size = 10
.Strikethrough = False
.Superscript = False
.Subscript = False
.OutlineFont = False
.Shadow = False
.Underline = xlUnderlineStyleNone
End With