R
Rob
Hi,
I need to copy a static range and paste to specific cells at specific times.
The time interval is over 370 minutes. Here is the code that seems to work
well.
Sub CopyVolume1()
Range("C2:C4").Select
Selection.Copy
Range("D2").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone,
SkipBlanks _
:=False, Transpose:=False
End Sub
Public Sub Time()
Application.OnTime TimeValue("14:07:00"), "CopyVolume1"
Application.OnTime TimeValue("14:08:00"), "CopyVolume2"
Application.OnTime TimeValue("14:09:00"), "CopyVolume3"
End Sub
Sub CopyVolume2()
Range("C2:C4").Select
Selection.Copy
Range("e2").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone,
SkipBlanks _
:=False, Transpose:=False
End Sub
Sub CopyVolume3()
Range("C2:C4").Select
Selection.Copy
Range("f2").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone,
SkipBlanks _
:=False, Transpose:=False
End Sub
Is there a way to do this with out having to copy and paste the Sub
CopyVolume3
until I have 370 Sub CopyVolumes and 370 Application.OnTime
TimeValue("14:09:00"), "CopyVolume3". Each time having to enter the various
parameters ?
I need to copy a static range and paste to specific cells at specific times.
The time interval is over 370 minutes. Here is the code that seems to work
well.
Sub CopyVolume1()
Range("C2:C4").Select
Selection.Copy
Range("D2").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone,
SkipBlanks _
:=False, Transpose:=False
End Sub
Public Sub Time()
Application.OnTime TimeValue("14:07:00"), "CopyVolume1"
Application.OnTime TimeValue("14:08:00"), "CopyVolume2"
Application.OnTime TimeValue("14:09:00"), "CopyVolume3"
End Sub
Sub CopyVolume2()
Range("C2:C4").Select
Selection.Copy
Range("e2").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone,
SkipBlanks _
:=False, Transpose:=False
End Sub
Sub CopyVolume3()
Range("C2:C4").Select
Selection.Copy
Range("f2").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone,
SkipBlanks _
:=False, Transpose:=False
End Sub
Is there a way to do this with out having to copy and paste the Sub
CopyVolume3
until I have 370 Sub CopyVolumes and 370 Application.OnTime
TimeValue("14:09:00"), "CopyVolume3". Each time having to enter the various
parameters ?