Hi All,
I am trying to programme a Macro that takes values (F3:F35)from sheet ("Cover") every 5 minutes and displays the results on another sheet("dax history"). This is what I have so far:
------------------------------------------------------------
Option Explicit
Dim mdNextTime As Double
Sub StartIt()
Application.OnTime Now, "UpDateSub"
End Sub
Sub StopIt()
Application.OnTime mdNextTime, "UpDateSub", , False
End Sub
Sub UpDateSub()
Worksheets("Cover").Range("F3:F32").Copy _
Destination:=Worksheets("dax history").Range("B1:B30").End(xlToRight).Offset(, 1)
mdNextTime = Now + TimeValue("00:05:00")
Application.OnTime mdNextTime, "UpdateSub"
End Sub
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
End Sub
-------------------------------------------------------
the cells F3:F32 update every few seconds so I want the macro to just paste the values every 5 minutes and move on to the next cell to the right.
Thanks for your help.
Paul.
I am trying to programme a Macro that takes values (F3:F35)from sheet ("Cover") every 5 minutes and displays the results on another sheet("dax history"). This is what I have so far:
------------------------------------------------------------
Option Explicit
Dim mdNextTime As Double
Sub StartIt()
Application.OnTime Now, "UpDateSub"
End Sub
Sub StopIt()
Application.OnTime mdNextTime, "UpDateSub", , False
End Sub
Sub UpDateSub()
Worksheets("Cover").Range("F3:F32").Copy _
Destination:=Worksheets("dax history").Range("B1:B30").End(xlToRight).Offset(, 1)
mdNextTime = Now + TimeValue("00:05:00")
Application.OnTime mdNextTime, "UpdateSub"
End Sub
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
End Sub
-------------------------------------------------------
the cells F3:F32 update every few seconds so I want the macro to just paste the values every 5 minutes and move on to the next cell to the right.
Thanks for your help.
Paul.