Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
carl
 
Posts: n/a
Default Help With A Macro

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, "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

I place it in a standard module but it does not engage.

Thank you in advance.
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Bob Phillips
 
Posts: n/a
Default Help With A Macro

Try TimeSerial, not Time

--
HTH

Bob Phillips

(remove nothere from email address if mailing direct)

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

I place it in a standard module but it does not engage.

Thank you in advance.



  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
carl
 
Posts: n/a
Default Help With A Macro

Thank you Bob.

When you suggest trying "TimeSerial", not sure what you mean.

Regards.

"Bob Phillips" wrote:

Try TimeSerial, not Time

--
HTH

Bob Phillips

(remove nothere from email address if mailing direct)

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

I place it in a standard module but it does not engage.

Thank you in advance.




  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Chip Pearson
 
Posts: n/a
Default Help With A Macro

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


"carl" wrote in message
...
Thank you Bob.

When you suggest trying "TimeSerial", not sure what you mean.

Regards.

"Bob Phillips" wrote:

Try TimeSerial, not Time

--
HTH

Bob Phillips

(remove nothere from email address if mailing direct)

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

I place it in a standard module but it does not engage.

Thank you in advance.






  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Dave Peterson
 
Posts: n/a
Default Help With A Macro

nTime = Now + TimeSerial(0, 0, 5) ' 5 secs

carl wrote:

Thank you Bob.

When you suggest trying "TimeSerial", not sure what you mean.

Regards.

"Bob Phillips" wrote:

Try TimeSerial, not Time

--
HTH

Bob Phillips

(remove nothere from email address if mailing direct)

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

I place it in a standard module but it does not engage.

Thank you in advance.





--

Dave Peterson


  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
carl
 
Posts: n/a
Default Help With A Macro

Thanks All. It works not but it wont stop. Bob suggested I use this:

Application.OnTime nTime, "temp",,False

How do I add this to my workbook ?

"Dave Peterson" wrote:

nTime = Now + TimeSerial(0, 0, 5) ' 5 secs

carl wrote:

Thank you Bob.

When you suggest trying "TimeSerial", not sure what you mean.

Regards.

"Bob Phillips" wrote:

Try TimeSerial, not Time

--
HTH

Bob Phillips

(remove nothere from email address if mailing direct)

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

I place it in a standard module but it does not engage.

Thank you in advance.




--

Dave Peterson

  #7   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Dave Peterson
 
Posts: n/a
Default Help With A Macro

Start he

Chip Pearson has lots of instructions at:
http://www.cpearson.com/excel/ontime.htm

carl wrote:

Thanks All. It works not but it wont stop. Bob suggested I use this:

Application.OnTime nTime, "temp",,False

How do I add this to my workbook ?

"Dave Peterson" wrote:

nTime = Now + TimeSerial(0, 0, 5) ' 5 secs

carl wrote:

Thank you Bob.

When you suggest trying "TimeSerial", not sure what you mean.

Regards.

"Bob Phillips" wrote:

Try TimeSerial, not Time

--
HTH

Bob Phillips

(remove nothere from email address if mailing direct)

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

I place it in a standard module but it does not engage.

Thank you in advance.




--

Dave Peterson


--

Dave Peterson
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
Search, Copy, Paste Macro in Excel [email protected] Excel Worksheet Functions 0 January 3rd 06 06:51 PM
Closing File Error jcliquidtension Excel Discussion (Misc queries) 4 October 20th 05 12:22 PM
macro with F9 Kenny Excel Discussion (Misc queries) 1 August 3rd 05 02:41 PM
Make Alignment options under format cells available as shortcut dforrest Excel Discussion (Misc queries) 1 July 14th 05 10:58 PM
Playing a macro from another workbook Jim Excel Discussion (Misc queries) 1 February 23rd 05 10:12 PM


All times are GMT +1. The time now is 05:40 AM.

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

About Us

"It's about Microsoft Excel"