The VBA code below runs when the key F8 is pressed, but not when the key F5. It simply doesn't run; it makes no errors of any kind.
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?