I have a macro that is used to clear sales of my transaction in Excel, what i want is every night at a specific time (example 9.00PM) it automatically run this macro so i dont have to do it manually everyday. Is it possible to do that ? can someone help me thanks
this is the clear sales macro
Sub clearSales()
Dim lastRow As Long
Dim rConstants As Range
lastRow = Sheets("DaftarPenjualan").Range("A" & Rows.Count).End(xlUp).Row
Set rConstants = Sheets("DaftarPenjualan").Range("A2:H" & lastRow).SpecialCells(xlCellTypeConstants)
rConstants.ClearContents
Sheets("2barang").Range("B10").Value = 1
End Sub