Hey Guys I am having a problem with RTD (REAL TIME DATA) could someone please help me

daniboymu

New Member
Joined
Nov 1, 2020
Messages
39
Office Version
  1. 2019
Platform
  1. Windows
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:
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:

Some videos you may like

Excel Facts

Will the fill handle fill 1, 2, 3?
Yes! Type 1 in a cell. Hold down Ctrl while you drag the fill handle.

GWteB

Well-known Member
Joined
Sep 10, 2010
Messages
1,247
Office Version
  1. 2013
Platform
  1. Windows
So basically this is what you want, am I right?
(pseudo code):
Rich (BB code):
    DO  > every 5 minutes (between 09.00 AM and 06:15 PM)

        DO > on Sheet("Database")

           Rows(7).Insert 
           Range("A8:DG8").Value = Range("A5:DG5").Value
        END
    END
 

Watch MrExcel Video

Forum statistics

Threads
1,118,141
Messages
5,570,409
Members
412,323
Latest member
DemonX
Top