Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Streaming Data into another sheet every 5 minutes

Status
Not open for further replies.

pad70

Vendor
Jan 7, 2008
7
IE
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.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top