ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Copy/Paste (https://www.excelbanter.com/excel-discussion-misc-queries/60557-copy-paste.html)

Saxman

Copy/Paste
 
I need to delay the the follwing copy/paste operations in a macro with a
time interval of 30 seconds. Is this possible?

Sheets("Show").Select
Application.CutCopyMode = False
Selection.Copy
Sheets("Chartdata").Select
Range("B2").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone,
SkipBlanks _
:=False, Transpose:=False

Sheets("Show").Select
Application.CutCopyMode = False
Selection.Copy
Sheets("Chartdata").Select
Range("C2").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone,
SkipBlanks _
:=False, Transpose:=False

and so on...................The source data ("Show") changes every 30 secs.

TIA

Dave O

Copy/Paste
 
Is this a follow-on to your previous post? I didn't realize it would
have to run continuously throughout the day. If that's the case you'd
need to set up the Timer function inside a Do Loop structure, along
with Calculate commands that allow the spreadsheet to update.
Additionally you will likely need code that triggers the update event.


Saxman

Copy/Paste
 
On 15 Dec 2005 06:06:44 -0800, Dave O wrote:

Is this a follow-on to your previous post?


That's right! I'm still struggling!

I didn't realize it would
have to run continuously throughout the day. If that's the case you'd
need to set up the Timer function inside a Do Loop structure, along
with Calculate commands that allow the spreadsheet to update.
Additionally you will likely need code that triggers the update event.


A Do Loop for every copy/paste? Maybe you could give me the bare bones of
a code, so I would know what it looks like? Then maybe I could proceed
from there.

Thanks.

Dave Peterson

Copy/Paste
 
Maybe you could use application.ontime to run your code every 30 seconds???

Chip Pearson has lots of instructions at:
http://www.cpearson.com/excel/ontime.htm

Saxman wrote:

I need to delay the the follwing copy/paste operations in a macro with a
time interval of 30 seconds. Is this possible?

Sheets("Show").Select
Application.CutCopyMode = False
Selection.Copy
Sheets("Chartdata").Select
Range("B2").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone,
SkipBlanks _
:=False, Transpose:=False

Sheets("Show").Select
Application.CutCopyMode = False
Selection.Copy
Sheets("Chartdata").Select
Range("C2").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone,
SkipBlanks _
:=False, Transpose:=False

and so on...................The source data ("Show") changes every 30 secs.

TIA


--

Dave Peterson


All times are GMT +1. The time now is 08:57 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com