My workbook has2 worksheets. Sheet1 and Sheet2. Data is sent to Sheet2 from an outside source. The data fills about 50 cells. New data is added, in batches, about every 10 minutes. The data is then used to compile some statistics in Sheet1.
I use this code to run the StatsWrite sub when the data has updated:
Problem is that the StatsWrite sub (writes data to Sheet1) runs after each cell in Sheet2 is updated and this makes the whole thing very slow. I need to delay the running of the sub until each batch of data has completed, and then run the sub once. Then when the next batch of data is added, some minutes later, the sub runs again. There is usually a delay of 5 to 10 minutes between data updates.
I use this code to run the StatsWrite sub when the data has updated:
Code:
Private Sub Worksheet_Change(ByVal Target As Range)
Call StatsWrite
End Sub