M not able to run this code in every 15 min ...someone pls help me ... the code start at 9;15 am and it's copy the value in every second from RTD data from Column 2 (in subsequent rows) but i want that the code copy data in every 15 min only. Suppose at 9:30 am the code starts and copy the value and then stop automatically its repeat the process in every 15 min till 15:30.
Private Sub Worksheet_Calculate()
If Time >= TimeSerial(15, 29, 59) And Time <= TimeSerial(15, 30, 0) Then
capturerow = 2
currow = Range("A65536").End(xlUp).Row
Cells(currow + 1, 1) = Cells(capturerow, 1)
Cells(currow + 1, 2) = Cells(capturerow, 2)
Cells(currow + 1, 3) = Cells(capturerow, 3)
Cells(currow + 1, 4) = Cells(capturerow, 4)
Cells(currow + 1, 5) = Cells(capturerow, 5)
Else
Exit Sub
End If
End Sub
Private Sub Worksheet_Calculate()
If Time >= TimeSerial(15, 29, 59) And Time <= TimeSerial(15, 30, 0) Then
capturerow = 2
currow = Range("A65536").End(xlUp).Row
Cells(currow + 1, 1) = Cells(capturerow, 1)
Cells(currow + 1, 2) = Cells(capturerow, 2)
Cells(currow + 1, 3) = Cells(capturerow, 3)
Cells(currow + 1, 4) = Cells(capturerow, 4)
Cells(currow + 1, 5) = Cells(capturerow, 5)
Else
Exit Sub
End If
End Sub