Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I have a macro that saves the workbook 30 minutes after opening using
"OnTime". Is there a way to stop this once it has started? I know one way is to close and reopen the workbook and Excel but is there a way to do it without having to close the workbook? Thanks in advance. |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Nope... the best you will do is to pop a mesage for the user warning them of
the save... if msgbox("Do you wanna save???", vbyesno) = vbyes then thisworkbook.save -- HTH... Jim Thomlinson "Carl" wrote: I have a macro that saves the workbook 30 minutes after opening using "OnTime". Is there a way to stop this once it has started? I know one way is to close and reopen the workbook and Excel but is there a way to do it without having to close the workbook? Thanks in advance. |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Thanks, Jim. I was afraid this would be the case.
"Jim Thomlinson" wrote: Nope... the best you will do is to pop a mesage for the user warning them of the save... if msgbox("Do you wanna save???", vbyesno) = vbyes then thisworkbook.save -- HTH... Jim Thomlinson "Carl" wrote: I have a macro that saves the workbook 30 minutes after opening using "OnTime". Is there a way to stop this once it has started? I know one way is to close and reopen the workbook and Excel but is there a way to do it without having to close the workbook? Thanks in advance. |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
If you mean abort a scheduled Ontime before it's occurred, store the
'EarliestTime' and set the optional Schedule to false, eg Sub myOnTime(bRun As Boolean) Static tme As Date ' or at module level If bRun Then tme = Now + TimeSerial(0, 0, 5) ' 5 sec's from now End If Application.OnTime tme, "myMacro", schedule:=bRun End Sub Regards, Peter T "Carl" wrote in message ... Thanks, Jim. I was afraid this would be the case. "Jim Thomlinson" wrote: Nope... the best you will do is to pop a mesage for the user warning them of the save... if msgbox("Do you wanna save???", vbyesno) = vbyes then thisworkbook.save -- HTH... Jim Thomlinson "Carl" wrote: I have a macro that saves the workbook 30 minutes after opening using "OnTime". Is there a way to stop this once it has started? I know one way is to close and reopen the workbook and Excel but is there a way to do it without having to close the workbook? Thanks in advance. |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Well, maybe...
http://www.cpearson.com/excel/ontime.htm -- Jim Cone San Francisco, USA http://www.realezsites.com/bus/primitivesoftware "Carl" wrote in message Thanks, Jim. I was afraid this would be the case. "Jim Thomlinson" wrote: Nope... the best you will do is to pop a mesage for the user warning them of the save... if msgbox("Do you wanna save???", vbyesno) = vbyes then thisworkbook.save HTH... Jim Thomlinson "Carl" wrote: I have a macro that saves the workbook 30 minutes after opening using "OnTime". Is there a way to stop this once it has started? I know one way is to close and reopen the workbook and Excel but is there a way to do it without having to close the workbook? Thanks in advance. |
#6
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Chip Pearson has lots of instructions at:
http://www.cpearson.com/excel/ontime.htm Carl wrote: I have a macro that saves the workbook 30 minutes after opening using "OnTime". Is there a way to stop this once it has started? I know one way is to close and reopen the workbook and Excel but is there a way to do it without having to close the workbook? Thanks in advance. -- Dave Peterson |
#7
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Thanks to all for the great information!
"Dave Peterson" wrote: Chip Pearson has lots of instructions at: http://www.cpearson.com/excel/ontime.htm Carl wrote: I have a macro that saves the workbook 30 minutes after opening using "OnTime". Is there a way to stop this once it has started? I know one way is to close and reopen the workbook and Excel but is there a way to do it without having to close the workbook? Thanks in advance. -- Dave Peterson |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Getting "file corrupted" messages, started recently. | Excel Discussion (Misc queries) | |||
cancel the "Getting Started" Dialogue Box when I open XL/Word | Setting up and Configuration of Excel | |||
how to enter data "OnTime", OR when workbook opened | Excel Worksheet Functions | |||
How to permanently get rid of "Getting Started" task pane in Exce | Excel Discussion (Misc queries) | |||
Is there any way to set the autofilter of a specified column to "non blank" when the workbook is started? | Excel Programming |