I would greatly appreciate if anyone could help me with the following.
I have a macro that would clear numerical contents of each cell in column A every one minute (initiated by the click of a command button linked to this macro).
However, this macro begins to clear contents from the last cell in column (i.e A65536) and moves upwards.
(a) What I actually need is for the reverse to happen, starting to clear cells beginning A1(or a specified cell) and move downwards every minute till A65536.
(b) Also, I would want the same to happen to cells in columns B till AB.
Thank you very much in advance.
My code is as follows
Option Explicit
Public dTime As Date
Sub ClearCell()
Dim c As Range
For Each c In Range("A65536").End(xlUp)
If IsNumeric(Val(c)) Then c.ClearContents
Next c
Call StartTimer
End Sub
Sub StartTimer()
dTime = Now + TimeValue("00:01:00")
Application.OnTime dTime, "ClearCell", Schedule:=True
End Sub
Sub StopTimer()
On Error Resume Next
Application.OnTime dTime, "ClearCell", Schedule:=False
End Sub
Bookmarks