LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
ina ina is offline
external usenet poster
 
Posts: 120
Default execute macro; save it and close using Application.OnTime

hello,

I would like to know how to save after than the macro is finished to
run; for example I have this piece of code:


......
dtmTime = Now + TimeValue("00:00:07")
Application.OnTime dtmTime, "thisworkbook.operations"


Application.DisplayAlerts = False
ActiveWorkbook.SaveAs Filename:= _
"C:\test.xls", FileFormat:=xlHtml, ReadOnlyRecommended:=False,
CreateBackup:=False
Application.DisplayAlerts = True
'and there how to determinate the exact time of the end of my macro; do
you think I have the
'possibility to catch it with something else than now ().
'my macro is a little slow as need to do a lot of calculation

dtmSave = dtmTime + TimeValue("00:01:00")
Application.OnTime dtmSave, "Save_Exit"

ina

 
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
schedule macro - application.OnTime ina Excel Programming 2 May 9th 06 04:27 PM
Application.OnTime -- Unable to Pass Macro with Numeric Parameter Butaambala Excel Programming 7 June 7th 05 10:55 PM
Need Macro To Close Excel Application MarySue Excel Programming 3 January 5th 05 07:24 PM
macro to close excel application other than application.quit mary Excel Programming 1 September 14th 04 03:43 PM
Save and Close Excel using OnTime shockley Excel Programming 1 July 20th 04 06:48 AM


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