I am trying to get this macro to run but am having trouble:
Public nTime
Sub xx()
nTime = Now Time(0, 0, 5) ' 5 secs
Application.OnTime nTime, quot;tempquot;
End SubSub temp()
Dim iLastRow As Long
Range(Range(quot;C2quot;), Range(quot;C2quot;).End(xlDown)).Copy
Range(quot;F2quot;).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, quot;tempquot;
End Sub
I place it in a standard module but it does not engage.
Thank you in advance.
Try TimeSerial, not Time
--
HTH
Bob Phillips
(remove nothere from email address if mailing direct)
quot;carlquot; gt; wrote in message
news
gt; I am trying to get this macro to run but am having trouble:
gt;
gt; Public nTime
gt;
gt; Sub xx()
gt;
gt; nTime = Now Time(0, 0, 5) ' 5 secs
gt; Application.OnTime nTime, quot;tempquot;
gt;
gt; End Sub
gt;
gt;
gt; Sub temp()
gt; Dim iLastRow As Long
gt;
gt; Range(Range(quot;C2quot;), Range(quot;C2quot;).End(xlDown)).Copy
gt; Range(quot;F2quot;).End(xlDown).Offset(1, 0).PasteSpecial _
gt; Paste:=xlValues, _
gt; Operation:=xlNone, _
gt; SkipBlanks:=False, _
gt; Transpose:=False
gt;
gt; nTime = Now Time(0, 0, 5) ' 5 secs
gt; Application.OnTime nTime, quot;tempquot;
gt; End Sub
gt;
gt; I place it in a standard module but it does not engage.
gt;
gt; Thank you in advance.
Thank you Bob.
When you suggest trying quot;TimeSerialquot;, not sure what you mean.
Regards.
quot;Bob Phillipsquot; wrote:
gt; Try TimeSerial, not Time
gt;
gt; --
gt; HTH
gt;
gt; Bob Phillips
gt;
gt; (remove nothere from email address if mailing direct)
gt;
gt; quot;carlquot; gt; wrote in message
gt; news
gt; gt; I am trying to get this macro to run but am having trouble:
gt; gt;
gt; gt; Public nTime
gt; gt;
gt; gt; Sub xx()
gt; gt;
gt; gt; nTime = Now Time(0, 0, 5) ' 5 secs
gt; gt; Application.OnTime nTime, quot;tempquot;
gt; gt;
gt; gt; End Sub
gt; gt;
gt; gt;
gt; gt; Sub temp()
gt; gt; Dim iLastRow As Long
gt; gt;
gt; gt; Range(Range(quot;C2quot;), Range(quot;C2quot;).End(xlDown)).Copy
gt; gt; Range(quot;F2quot;).End(xlDown).Offset(1, 0).PasteSpecial _
gt; gt; Paste:=xlValues, _
gt; gt; Operation:=xlNone, _
gt; gt; SkipBlanks:=False, _
gt; gt; Transpose:=False
gt; gt;
gt; gt; nTime = Now Time(0, 0, 5) ' 5 secs
gt; gt; Application.OnTime nTime, quot;tempquot;
gt; gt; End Sub
gt; gt;
gt; gt; I place it in a standard module but it does not engage.
gt; gt;
gt; gt; Thank you in advance.
gt;
gt;
gt;
He mean changing the line
nTime = Now Time(0, 0, 5) ' 5 secs
to
nTime = Now TimeSerial(0, 0, 5) ' 5 secs--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.comquot;carlquot; gt; wrote in message
news
gt; Thank you Bob.
gt;
gt; When you suggest trying quot;TimeSerialquot;, not sure what you mean.
gt;
gt; Regards.
gt;
gt; quot;Bob Phillipsquot; wrote:
gt;
gt;gt; Try TimeSerial, not Time
gt;gt;
gt;gt; --
gt;gt; HTH
gt;gt;
gt;gt; Bob Phillips
gt;gt;
gt;gt; (remove nothere from email address if mailing direct)
gt;gt;
gt;gt; quot;carlquot; gt; wrote in message
gt;gt; news
gt;gt; gt; I am trying to get this macro to run but am having trouble:
gt;gt; gt;
gt;gt; gt; Public nTime
gt;gt; gt;
gt;gt; gt; Sub xx()
gt;gt; gt;
gt;gt; gt; nTime = Now Time(0, 0, 5) ' 5 secs
gt;gt; gt; Application.OnTime nTime, quot;tempquot;
gt;gt; gt;
gt;gt; gt; End Sub
gt;gt; gt;
gt;gt; gt;
gt;gt; gt; Sub temp()
gt;gt; gt; Dim iLastRow As Long
gt;gt; gt;
gt;gt; gt; Range(Range(quot;C2quot;), Range(quot;C2quot;).End(xlDown)).Copy
gt;gt; gt; Range(quot;F2quot;).End(xlDown).Offset(1, 0).PasteSpecial _
gt;gt; gt; Paste:=xlValues, _
gt;gt; gt; Operation:=xlNone, _
gt;gt; gt; SkipBlanks:=False, _
gt;gt; gt; Transpose:=False
gt;gt; gt;
gt;gt; gt; nTime = Now Time(0, 0, 5) ' 5 secs
gt;gt; gt; Application.OnTime nTime, quot;tempquot;
gt;gt; gt; End Sub
gt;gt; gt;
gt;gt; gt; I place it in a standard module but it does not engage.
gt;gt; gt;
gt;gt; gt; Thank you in advance.
gt;gt;
gt;gt;
gt;gt;
nTime = Now TimeSerial(0, 0, 5) ' 5 secs
carl wrote:
gt;
gt; Thank you Bob.
gt;
gt; When you suggest trying quot;TimeSerialquot;, not sure what you mean.
gt;
gt; Regards.
gt;
gt; quot;Bob Phillipsquot; wrote:
gt;
gt; gt; Try TimeSerial, not Time
gt; gt;
gt; gt; --
gt; gt; HTH
gt; gt;
gt; gt; Bob Phillips
gt; gt;
gt; gt; (remove nothere from email address if mailing direct)
gt; gt;
gt; gt; quot;carlquot; gt; wrote in message
gt; gt; news
gt; gt; gt; I am trying to get this macro to run but am having trouble:
gt; gt; gt;
gt; gt; gt; Public nTime
gt; gt; gt;
gt; gt; gt; Sub xx()
gt; gt; gt;
gt; gt; gt; nTime = Now Time(0, 0, 5) ' 5 secs
gt; gt; gt; Application.OnTime nTime, quot;tempquot;
gt; gt; gt;
gt; gt; gt; End Sub
gt; gt; gt;
gt; gt; gt;
gt; gt; gt; Sub temp()
gt; gt; gt; Dim iLastRow As Long
gt; gt; gt;
gt; gt; gt; Range(Range(quot;C2quot;), Range(quot;C2quot;).End(xlDown)).Copy
gt; gt; gt; Range(quot;F2quot;).End(xlDown).Offset(1, 0).PasteSpecial _
gt; gt; gt; Paste:=xlValues, _
gt; gt; gt; Operation:=xlNone, _
gt; gt; gt; SkipBlanks:=False, _
gt; gt; gt; Transpose:=False
gt; gt; gt;
gt; gt; gt; nTime = Now Time(0, 0, 5) ' 5 secs
gt; gt; gt; Application.OnTime nTime, quot;tempquot;
gt; gt; gt; End Sub
gt; gt; gt;
gt; gt; gt; I place it in a standard module but it does not engage.
gt; gt; gt;
gt; gt; gt; Thank you in advance.
gt; gt;
gt; gt;
gt; gt;
--
Dave Peterson
Thanks All. It works not but it wont stop. Bob suggested I use this:
Application.OnTime nTime, quot;tempquot;,,False
How do I add this to my workbook ?
quot;Dave Petersonquot; wrote:
gt; nTime = Now TimeSerial(0, 0, 5) ' 5 secs
gt;
gt; carl wrote:
gt; gt;
gt; gt; Thank you Bob.
gt; gt;
gt; gt; When you suggest trying quot;TimeSerialquot;, not sure what you mean.
gt; gt;
gt; gt; Regards.
gt; gt;
gt; gt; quot;Bob Phillipsquot; wrote:
gt; gt;
gt; gt; gt; Try TimeSerial, not Time
gt; gt; gt;
gt; gt; gt; --
gt; gt; gt; HTH
gt; gt; gt;
gt; gt; gt; Bob Phillips
gt; gt; gt;
gt; gt; gt; (remove nothere from email address if mailing direct)
gt; gt; gt;
gt; gt; gt; quot;carlquot; gt; wrote in message
gt; gt; gt; news
gt; gt; gt; gt; I am trying to get this macro to run but am having trouble:
gt; gt; gt; gt;
gt; gt; gt; gt; Public nTime
gt; gt; gt; gt;
gt; gt; gt; gt; Sub xx()
gt; gt; gt; gt;
gt; gt; gt; gt; nTime = Now Time(0, 0, 5) ' 5 secs
gt; gt; gt; gt; Application.OnTime nTime, quot;tempquot;
gt; gt; gt; gt;
gt; gt; gt; gt; End Sub
gt; gt; gt; gt;
gt; gt; gt; gt;
gt; gt; gt; gt; Sub temp()
gt; gt; gt; gt; Dim iLastRow As Long
gt; gt; gt; gt;
gt; gt; gt; gt; Range(Range(quot;C2quot;), Range(quot;C2quot;).End(xlDown)).Copy
gt; gt; gt; gt; Range(quot;F2quot;).End(xlDown).Offset(1, 0).PasteSpecial _
gt; gt; gt; gt; Paste:=xlValues, _
gt; gt; gt; gt; Operation:=xlNone, _
gt; gt; gt; gt; SkipBlanks:=False, _
gt; gt; gt; gt; Transpose:=False
gt; gt; gt; gt;
gt; gt; gt; gt; nTime = Now Time(0, 0, 5) ' 5 secs
gt; gt; gt; gt; Application.OnTime nTime, quot;tempquot;
gt; gt; gt; gt; End Sub
gt; gt; gt; gt;
gt; gt; gt; gt; I place it in a standard module but it does not engage.
gt; gt; gt; gt;
gt; gt; gt; gt; Thank you in advance.
gt; gt; gt;
gt; gt; gt;
gt; gt; gt;
gt;
gt; --
gt;
gt; Dave Peterson
gt;
Start he
Chip Pearson has lots of instructions at:
www.cpearson.com/excel/ontime.htm
carl wrote:
gt;
gt; Thanks All. It works not but it wont stop. Bob suggested I use this:
gt;
gt; Application.OnTime nTime, quot;tempquot;,,False
gt;
gt; How do I add this to my workbook ?
gt;
gt; quot;Dave Petersonquot; wrote:
gt;
gt; gt; nTime = Now TimeSerial(0, 0, 5) ' 5 secs
gt; gt;
gt; gt; carl wrote:
gt; gt; gt;
gt; gt; gt; Thank you Bob.
gt; gt; gt;
gt; gt; gt; When you suggest trying quot;TimeSerialquot;, not sure what you mean.
gt; gt; gt;
gt; gt; gt; Regards.
gt; gt; gt;
gt; gt; gt; quot;Bob Phillipsquot; wrote:
gt; gt; gt;
gt; gt; gt; gt; Try TimeSerial, not Time
gt; gt; gt; gt;
gt; gt; gt; gt; --
gt; gt; gt; gt; HTH
gt; gt; gt; gt;
gt; gt; gt; gt; Bob Phillips
gt; gt; gt; gt;
gt; gt; gt; gt; (remove nothere from email address if mailing direct)
gt; gt; gt; gt;
gt; gt; gt; gt; quot;carlquot; gt; wrote in message
gt; gt; gt; gt; news
gt; gt; gt; gt; gt; I am trying to get this macro to run but am having trouble:
gt; gt; gt; gt; gt;
gt; gt; gt; gt; gt; Public nTime
gt; gt; gt; gt; gt;
gt; gt; gt; gt; gt; Sub xx()
gt; gt; gt; gt; gt;
gt; gt; gt; gt; gt; nTime = Now Time(0, 0, 5) ' 5 secs
gt; gt; gt; gt; gt; Application.OnTime nTime, quot;tempquot;
gt; gt; gt; gt; gt;
gt; gt; gt; gt; gt; End Sub
gt; gt; gt; gt; gt;
gt; gt; gt; gt; gt;
gt; gt; gt; gt; gt; Sub temp()
gt; gt; gt; gt; gt; Dim iLastRow As Long
gt; gt; gt; gt; gt;
gt; gt; gt; gt; gt; Range(Range(quot;C2quot;), Range(quot;C2quot;).End(xlDown)).Copy
gt; gt; gt; gt; gt; Range(quot;F2quot;).End(xlDown).Offset(1, 0).PasteSpecial _
gt; gt; gt; gt; gt; Paste:=xlValues, _
gt; gt; gt; gt; gt; Operation:=xlNone, _
gt; gt; gt; gt; gt; SkipBlanks:=False, _
gt; gt; gt; gt; gt; Transpose:=False
gt; gt; gt; gt; gt;
gt; gt; gt; gt; gt; nTime = Now Time(0, 0, 5) ' 5 secs
gt; gt; gt; gt; gt; Application.OnTime nTime, quot;tempquot;
gt; gt; gt; gt; gt; End Sub
gt; gt; gt; gt; gt;
gt; gt; gt; gt; gt; I place it in a standard module but it does not engage.
gt; gt; gt; gt; gt;
gt; gt; gt; gt; gt; Thank you in advance.
gt; gt; gt; gt;
gt; gt; gt; gt;
gt; gt; gt; gt;
gt; gt;
gt; gt; --
gt; gt;
gt; gt; Dave Peterson
gt; gt;
--
Dave Peterson
- Nov 18 Sat 2006 20:10
Help With A Macro
close
全站熱搜
留言列表
發表留言