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

Excel motto
Not everything I do at work revolves around Excel. Only the fun parts.

GWteB

Well-known Member
Joined
Sep 10, 2010
Messages
1,295
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,122,364
Messages
5,595,722
Members
414,013
Latest member
tnobbs

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Top