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

daniboymu

Board Regular
Joined
Nov 1, 2020
Messages
54
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:

Excel Facts

Control Word Wrap
Press Alt+Enter to move to a new row in a cell. Lets you control where the words wrap.
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
 
Upvote 0

Forum statistics

Threads
1,213,515
Messages
6,114,080
Members
448,548
Latest member
harryls

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
Back
Top