So, I have a macro code here which works almost 100% of what I need the problem is, I have a sheet which works with RTD (Real Time Data) and is essential that the RTD works but when I run the macro the RTD stops, is it possible to make the sheet works with the macro (this macro runs automatic in an especific time and it needs to be running otherwise the sheets doesnt make sense) the macro updates the database every 5 minutes.
CODE:
CODE:
VBA Code:
Sub update()
Do
Sheets("Database").Select
If Time < TimeValue("09:00:00") Or Time >= TimeValue("18:15:00") Then End
Rows(7).Insert
Range("A8:DG8").Value = Range("A5:DG5").Value
WasteTime
Loop
End Sub
Sub WasteTime()
Dim time1, time2
time1 = Now
time2 = Now + TimeValue("00:05:00")
Do Until time1 >= time2
DoEvents
time1 = Now()
Loop
End Sub
Last edited: