This is my VBA code below, it executes when running with F8 but when running it with F5. it doesn't give any error or anything, it just doesn't run.
Dim LastColumn As Long
Set ws = ActiveSheet
Dim LastRow As Long
LastRow = 0
LastColumn = 0
LastRow = ws.Range("c" & Rows.Count).End(xlUp).Row
LastColumn = ws.Cells(11, ws.Columns.Count).End(xlToLeft).Column
Range(Cells(12, 1), Cells(LastRow, LastColumn)).Select
Selection.SpecialCells(xlCellTypeVisible).Interior.ColorIndex = -4142
delay 60
Range("A1").Select
I tried to delay the code for 60 seconds, maybe it runs too fast but doesn't work either. any help?