VBA Help for copy paste every 15 minutes in specified Cell

Paresh Rawal

New Member
Joined
Nov 27, 2020
Messages
1
Office Version
  1. 365
  2. 2016
Platform
  1. Windows
Dear All,

Please help me with the correct VBA code for the below details.

Have one data base in the excel file which refreshes every 15 minutes. But need to capture the data in different sheet on the same excel.

Below is the code i am trying but not getting the desired out put (need the data to be pasted every 15 minutes) currently its pasting everything in one go... Appreciate your help here.

Sub Refresh()

Sheets("Data").Range("D10,J10").Copy
Sheets("Chart").Select
Range("B2").Select

Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False


Runtimer = Now + TimeValue("00.15.00") - (getting error here)

Sheets("OI").Range("D10,J10").Copy
Sheets("Chart").Select
Range("B3").Select

Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False

Runtimer = Now + TimeValue("00.15.00")

Sheets("OI").Range("D10,J10").Copy
Sheets("Chart").Select
Range("B4").Select

Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False

Runtimer = Now + TimeValue("00.15.00")

Sheets("OI").Range("D10,J10").Copy
Sheets("Chart").Select
Range("B5").Select

Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False



But the current code is giving the result but not doing its job every 15 miutes.

Thank you for you help again!!!
 

Excel Facts

Can you AutoAverage in Excel?
There is a drop-down next to the AutoSum symbol. Open the drop-down to choose AVERAGE, COUNT, MAX, or MIN

Forum statistics

Threads
1,214,859
Messages
6,121,963
Members
449,059
Latest member
oculus

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