Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,836
Default Copy/Paste Controlled by Timer

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''.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 298
Default Copy/Paste Controlled by Timer

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" wrote in message
...
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''.



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,942
Default Copy/Paste Controlled by Timer

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''.

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,836
Default Copy/Paste Controlled by Timer

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''.

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,836
Default Copy/Paste Controlled by Timer

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
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Can't Copy and Paste or Paste Special between Excel Workbooks wllee Excel Discussion (Misc queries) 5 April 29th 23 03:43 AM
Automating copy/paste/paste special when row references change Carl LaFong Excel Programming 4 October 8th 07 06:10 AM
Stopping a Timer / Running a timer simultaneously on Excel Paul23 Excel Discussion (Misc queries) 1 March 10th 06 12:08 PM
Excel cut/Paste Problem: Year changes after data is copy and paste Asif Excel Discussion (Misc queries) 2 December 9th 05 05:16 PM
Copy and Paste macro needs to paste to a changing cell reference loulou Excel Programming 0 February 24th 05 10:29 AM


All times are GMT +1. The time now is 08:33 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"