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

Use Wait.

This example waits 10 seconds

newHour = Hour(Now())
newMinute = Minute(Now())
newSecond = Second(Now()) + 10
waitTime = TimeSerial(newHour, newMinute, newSecond)
Application.Wait waitTime

--
HTH

-------

Bob Phillips
... looking out across Poole Harbour to the Purbecks


"L Buchy" wrote in message
...
I am using the Timer function in the BeforeClose event to try & pause
application before saving file & exiting. I need to do this as I am

running
Excel via a VBScript & spreadsheet has DDE links & it needs a second or

two
for it to update the links. Whats happening is it saves the file & exits
too quick and my links are not updated in the saved file.

My code in the BeforeClose event is as follows (as found in help):

Start = Timer
Do While Timer < Start + 5
DoEvents
Loop

This doesn't seem to work. How can I pause or delay Excel before I
close/save the file?




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
Is there a way to have a timer or stopwatch function in Excel. JSenew Excel Worksheet Functions 3 October 23rd 07 08:36 PM
Lap-timer kabildgaard Excel Discussion (Misc queries) 0 August 11th 06 03:26 PM
Stopping a Timer / Running a timer simultaneously on Excel Paul23 Excel Discussion (Misc queries) 1 March 10th 06 12:08 PM
Timer function needs improvement Mike K Excel Worksheet Functions 0 July 17th 05 05:35 AM
Clock Timer/ Date Function Rob[_9_] Excel Programming 3 July 13th 03 12:57 AM


All times are GMT +1. The time now is 07:28 PM.

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

About Us

"It's about Microsoft Excel"