PDA

View Full Version : Time and column spacing



jsteve 1999
06-07-2008, 03:07 AM
Hello all
I am new here this problem is driving me mad
I have a worksheet ,in cell B1 I have a DDE input which changes evey second or so
What I have been trying to do is to get a timer to pick up the data evey 30 minutes and paste it down columns B2:B50 then carry on to D2:D50 and so on
The reason I want the result in every other column is because I have other
data in columns A,C,E and so on
I hope you can follow this and stop my headache
Many thanks
jsteve1999

mdmackillop
06-07-2008, 04:08 AM
I'm not clear on your basic data, but this will copy a range from column A every 5 seconds

Sub Test()
Application.OnTime Now + TimeValue("00:00:05"), "DoCopy"
End Sub

Sub DoCopy()
Static x As Long
x = x + 2
Range("A2:A50").Copy Range("A2").Offset(, x - 1)
If x > 10 Then Exit Sub
Test
End Sub

Bob Phillips
06-07-2008, 04:09 AM
Private mTime As Double

Sub UpDateCells()

Range("B1").AutoFill Range("B1:B50")
nTime = Now + TimeSerial(0, 0, 30)
Application.OnTime nTime, "UpdateCells"
End Sub

Sub KillUpDate()

Application.OnTime nTime, "UpdateCells", , False
End Sub

jsteve 1999
06-08-2008, 03:44 AM
Many thanks you guys I get the idea now you are brill
jsteve 1999