Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
I am uusing this:
Sub temp() Range("C2").Select Range(Selection, Selection.End(xlDown)).Select Application.CutCopyMode = False Selection.Copy Range("F2").Select Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:= _ False, Transpose:=False End Sub Is possible to have this macro execute every "n" seconds and when it executes, to go to the next "free" column to paste the data - for example on the 2nd execution the data would get pasted in G2, 3rd execution in H2 etc. Thank you in advance. |
#2
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
Public nTime
Sub xx() nTime = Now + Time(0, 0, 5) ' 5 secs Application.OnTime nTime, "temp" End Sub Sub temp() Dim iLastRow As Long Range(Range("C2"), Range("C2").End(xlDown)).Copy Range("F2").End(xlDown).Offset(1, 0).PasteSpecial _ Paste:=xlValues, _ Operation:=xlNone, _ SkipBlanks:=False, _ Transpose:=False nTime = Now + Time(0, 0, 5) ' 5 secs Application.OnTime nTime, "temp" End Sub You will need to stop it at some time Application.OnTime nTime, "temp",,False -- HTH Bob Phillips (remove nothere from email address if mailing direct) "carl" wrote in message ... I am uusing this: Sub temp() Range("C2").Select Range(Selection, Selection.End(xlDown)).Select Application.CutCopyMode = False Selection.Copy Range("F2").Select Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:= _ False, Transpose:=False End Sub Is possible to have this macro execute every "n" seconds and when it executes, to go to the next "free" column to paste the data - for example on the 2nd execution the data would get pasted in G2, 3rd execution in H2 etc. Thank you in advance. |
#3
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
Hi Bob. Tried to contact you direct last week on this one. Cannot get the
timer to work. Do I need to download the code ? regards. "Bob Phillips" wrote: Public nTime Sub xx() nTime = Now + Time(0, 0, 5) ' 5 secs Application.OnTime nTime, "temp" End Sub Sub temp() Dim iLastRow As Long Range(Range("C2"), Range("C2").End(xlDown)).Copy Range("F2").End(xlDown).Offset(1, 0).PasteSpecial _ Paste:=xlValues, _ Operation:=xlNone, _ SkipBlanks:=False, _ Transpose:=False nTime = Now + Time(0, 0, 5) ' 5 secs Application.OnTime nTime, "temp" End Sub You will need to stop it at some time Application.OnTime nTime, "temp",,False -- HTH Bob Phillips (remove nothere from email address if mailing direct) "carl" wrote in message ... I am uusing this: Sub temp() Range("C2").Select Range(Selection, Selection.End(xlDown)).Select Application.CutCopyMode = False Selection.Copy Range("F2").Select Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:= _ False, Transpose:=False End Sub Is possible to have this macro execute every "n" seconds and when it executes, to go to the next "free" column to paste the data - for example on the 2nd execution the data would get pasted in G2, 3rd execution in H2 etc. Thank you in advance. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Adding a Macro to a VLookup Function | Excel Discussion (Misc queries) | |||
macro with F9 | Excel Discussion (Misc queries) | |||
Make Alignment options under format cells available as shortcut | Excel Discussion (Misc queries) | |||
Customising Macro Buttons, Adding an image in excel | New Users to Excel | |||
Playing a macro from another workbook | Excel Discussion (Misc queries) |