Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Auto Run Macro


I currently have a macro that kickes off every 4 min's my problem i
that it kicks off just at random times.. closer to every 4 second..
this is my code


Public dTime As Date
Sub MyMacro()
dTime = Now + TimeValue("00:04:00")
Application.OnTime dTime, "MyMacro"

Any Ideas?
Chri

--
chris656
-----------------------------------------------------------------------
chris6562's Profile: http://www.excelforum.com/member.php...fo&userid=1577
View this thread: http://www.excelforum.com/showthread.php?threadid=27528

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,718
Default Auto Run Macro

You're saying the macro should run every 4 minutes but it does run every 4
seconds about? Your Timevalue string looks right. You could try this
instead:

dTime = DateAdd("n",4, now)

Make sure you start with a fresh Excel.

--
Jim Rech
Excel MVP
"chris6562" wrote in message
...
|
| I currently have a macro that kickes off every 4 min's my problem is
| that it kicks off just at random times.. closer to every 4 second...
| this is my code
|
|
| Public dTime As Date
| Sub MyMacro()
| dTime = Now + TimeValue("00:04:00")
| Application.OnTime dTime, "MyMacro"
|
| Any Ideas?
| Chris
|
|
| --
| chris6562
| ------------------------------------------------------------------------
| chris6562's Profile:
http://www.excelforum.com/member.php...o&userid=15772
| View this thread: http://www.excelforum.com/showthread...hreadid=275287
|


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
Sub Macro vrs Function Macro Auto Start Pat Excel Discussion (Misc queries) 7 June 6th 07 09:53 PM
Macro Help Needed - Excel 2007 - Print Macro with Auto Sort Gavin Excel Worksheet Functions 0 May 17th 07 01:20 PM
Macro Auto Run(2) Gary Excel Worksheet Functions 4 May 18th 06 09:07 AM
run macro auto JIM.H.[_2_] Excel Programming 4 June 11th 04 07:14 AM
Auto-run ONCE macro CLR Excel Programming 9 October 12th 03 03:23 AM


All times are GMT +1. The time now is 10:24 PM.

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"