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!!!
 

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.

fadee2

Active Member
Joined
Nov 7, 2020
Messages
253
Office Version
  1. 2019
Platform
  1. Windows
Look at this<<< Exactly what you are looking for.
 

Watch MrExcel Video

Forum statistics

Threads
1,118,265
Messages
5,571,216
Members
412,368
Latest member
saranbl
Top