Any idea why these lines of code would be causing my computer to lag and the excel sheet to freeze when closing the sheet?
It's supposed to be simple code to remove blue highlighting from the sheet before it closes. Thanks!
Code:
Private Sub Workbook_BeforeClose(Cancel As Boolean)
Dim f As Long
Dim j As Integer
For f = 1 To Rows.Count
If Cells(f, 1).Interior.ColorIndex = 37 Then
For j = 1 To 13
Cells(f, j).Interior.Color = xlNone
Next j
End If
Next f
End Sub
It's supposed to be simple code to remove blue highlighting from the sheet before it closes. Thanks!