LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 15
Default Saving a file every fifteen minutes

Hi Priyanka,

Sub StartIt()
Do While Time < TimeValue("4:50PM")

....
Loop
End Sub


Now the problem is, the computer hangs when i run this macro.


"Do While Time < TimeValue("4:50PM")" is a deadly sin.
It makes the computer run the code uninterruptedly until "4:50PM".
If you want code which executes every 15 Minutes after "4:50PM"
you might put "if timevalue ("4:50PM")" in Macro1.
And there is the call to startit (again) missing as well in Macro1.

Programming with times is a special challenge.
I think your code would stop at midnight, by the way.
--

Greetings from Bavaria, Germany

Helmut Weber, MVP WordVBA

Vista Small Business, Office XP
 
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
automatically saving a file every 5 minutes George Ferreira Excel Programming 0 November 16th 06 02:52 AM
Saving every 10 minutes serge Excel Discussion (Misc queries) 3 February 10th 06 01:21 PM
Excel 2003 Undo greys out after few minutes - Not saving laralea Excel Discussion (Misc queries) 1 June 30th 05 08:14 PM
how can convert 15 to Fifteen Purna Shrestha Excel Worksheet Functions 1 June 19th 05 07:43 PM
Timesheet /sum client fifteen minutes intervals activity Tom Ogilvy Excel Programming 0 July 23rd 04 05:53 PM


All times are GMT +1. The time now is 11:56 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"