PC Review


Reply
Thread Tools Rate Thread

Copy/Paste Controlled by Timer

 
 
ryguy7272
Guest
Posts: n/a
 
      8th Dec 2009
How can I create a macro that calculates a time interval, say 10 seconds, and
then copies all data from column B to column C, then waits 10 minutes, then
copies columns C to D, waits 10 minutes, then copies D to E, and so on and so
forth.

Thanks!


--
Ryan---
If this information was helpful, please indicate this by clicking ''Yes''.
 
Reply With Quote
 
 
 
 
Tim Williams
Guest
Posts: n/a
 
      8th Dec 2009
Look at Application.OnTime

eg.

Dim col As Integer

Sub StartItUp()
col = 2
Application.OnTime Now + TimeSerial(0, 0, 10), "DoCopy"
End Sub


Sub TimedCopy()
Sheet1.Columns(col).Copy Sheet1.Columns(col + 1)
col = col + 1
If col < 100 Then
Application.OnTime Now + TimeSerial(0, 10, 0), "DoCopy"
End If
End Sub


Tim

"ryguy7272" <(E-Mail Removed)> wrote in message
news:431B258C-91A0-48C6-834D-(E-Mail Removed)...
> How can I create a macro that calculates a time interval, say 10 seconds,
> and
> then copies all data from column B to column C, then waits 10 minutes,
> then
> copies columns C to D, waits 10 minutes, then copies D to E, and so on and
> so
> forth.
>
> Thanks!
>
>
> --
> Ryan---
> If this information was helpful, please indicate this by clicking ''Yes''.



 
Reply With Quote
 
FSt1
Guest
Posts: n/a
 
      8th Dec 2009
hi
i think you may be interested in the ontime method.
in vb help, type ontime. select ontime method
also see this site. lot of how to start and stop timers.
http://www.cpearson.com/excel/OnTime.aspx

Regards
FSt1


"ryguy7272" wrote:

> How can I create a macro that calculates a time interval, say 10 seconds, and
> then copies all data from column B to column C, then waits 10 minutes, then
> copies columns C to D, waits 10 minutes, then copies D to E, and so on and so
> forth.
>
> Thanks!
>
>
> --
> Ryan---
> If this information was helpful, please indicate this by clicking ''Yes''.

 
Reply With Quote
 
ryguy7272
Guest
Posts: n/a
 
      8th Dec 2009
Thanks FSt1! I've seen that before. Forgot about it; thanks for reminding
me. One more thing, how can I start in column B, copy then paste one column
to the right, then copy then paste that column (now in column C) and copy
then paste one to the right (now in column D) and copy then paste one to the
right (now in column E)...etc...

Thanks!
Ryan---

--
Ryan---
If this information was helpful, please indicate this by clicking ''Yes''.


"FSt1" wrote:

> hi
> i think you may be interested in the ontime method.
> in vb help, type ontime. select ontime method
> also see this site. lot of how to start and stop timers.
> http://www.cpearson.com/excel/OnTime.aspx
>
> Regards
> FSt1
>
>
> "ryguy7272" wrote:
>
> > How can I create a macro that calculates a time interval, say 10 seconds, and
> > then copies all data from column B to column C, then waits 10 minutes, then
> > copies columns C to D, waits 10 minutes, then copies D to E, and so on and so
> > forth.
> >
> > Thanks!
> >
> >
> > --
> > Ryan---
> > If this information was helpful, please indicate this by clicking ''Yes''.

 
Reply With Quote
 
ryguy7272
Guest
Posts: n/a
 
      8th Dec 2009
I ended up going with two columns, and got it working with this:

Dim i As Long
Dim iCol As Long
Dim num As Long

iCol = 7
num = 100

Columns(iCol).Select
Range("IV1").Select
Selection.End(xlToLeft).Select


For i = 0 To num

Selection.EntireColumn.Copy
ActiveCell.Offset(0, 2).Select
ActiveSheet.Paste

Next i

Thanks!
Ryan--

--
Ryan---
If this information was helpful, please indicate this by clicking ''Yes''.


"ryguy7272" wrote:

> Thanks FSt1! I've seen that before. Forgot about it; thanks for reminding
> me. One more thing, how can I start in column B, copy then paste one column
> to the right, then copy then paste that column (now in column C) and copy
> then paste one to the right (now in column D) and copy then paste one to the
> right (now in column E)...etc...
>
> Thanks!
> Ryan---
>
> --
> Ryan---
> If this information was helpful, please indicate this by clicking ''Yes''.
>
>
> "FSt1" wrote:
>
> > hi
> > i think you may be interested in the ontime method.
> > in vb help, type ontime. select ontime method
> > also see this site. lot of how to start and stop timers.
> > http://www.cpearson.com/excel/OnTime.aspx
> >
> > Regards
> > FSt1
> >
> >
> > "ryguy7272" wrote:
> >
> > > How can I create a macro that calculates a time interval, say 10 seconds, and
> > > then copies all data from column B to column C, then waits 10 minutes, then
> > > copies columns C to D, waits 10 minutes, then copies D to E, and so on and so
> > > forth.
> > >
> > > Thanks!
> > >
> > >
> > > --
> > > Ryan---
> > > If this information was helpful, please indicate this by clicking ''Yes''.

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How do I add 'controlled copy' and 'non-controlled copy' =?Utf-8?B?TmFuY3k=?= Microsoft Word Document Management 0 22nd Feb 2006 05:17 PM
How do I get copy/paste to copy/paste text and not the whole page =?Utf-8?B?Q2Fyb2wgSi4=?= Microsoft Word Document Management 1 6th May 2005 09:03 PM
Copy & Paste Object without using the Excel Copy Paste functions =?Utf-8?B?R2Fueg==?= Microsoft Excel New Users 0 10th Mar 2004 07:06 AM
Copy & Paste Object without using the Excel Copy Paste functions =?Utf-8?B?R2Fueg==?= Microsoft Excel Misc 0 10th Mar 2004 07:06 AM
COPY CONTROLLED tm CD Warning Richard Garforth Windows XP Music 0 2nd Jul 2003 07:34 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 11:35 AM.