Using this code, the result of the debug.print are between 500 - 600 milliseconds. That's a half a second. I am running a loop of 2000 cells, so that adds up very quickly.
Is there any other way to speed this up? For reference I have set these options first:
I'm timing it using the tickcount
Is there any other way to speed this up? For reference I have set these options first:
Code:
Application.ScreenUpdating = False
Application.StatusBar = False
Application.Calculation = xlCalculationManual
Application.DisplayStatusBar = False
Application.EnableEvents = False
I'm timing it using the tickcount
Code:
Public Declare Function GetTickCount Lib "kernel32.dll" () As Long
t = GetTickCount
Cell.Offset(, 1).Interior.ColorIndex = 4 ' This is the line that is taking 500ms
Debug.Print GetTickCount - t & " Setting Color Index = 4"