Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
Ed Ed is offline
external usenet poster
 
Posts: 279
Default How do I alter this AutoSave code?

There is a workbook used by many different users in my department. We
encounter a problem when someone opens the workbook and then forgets to close
it.

To eliminate this problem, I wrote in some code that automatically closes
the workbook after it has been open for 20 minutes. The procedure works fine
but I have a glitch. I (and I'm assuming others as well) run AutoSave (set
to prompt before saving). The problem occurs when the autosave promt comes
up and I don't respond to the prompt. When this happens, the procedure I
wrote is suspended until I respond to the prompt.

The following code runs the autosave.

Application.Run Range("AUTOSAVE.XLA!mcs02.OnTime")

Can I do something to surpress this line when the workbook is opened or when
this line attempts to run?

-

Also, it would work better if I could set the workbook to close if the
window for that workbook has been inactive for 3 minutes instead of
automatically after 20 minutes. Can anyone suggest something I could use for
that?

any suggestions are appreciated.

  #2   Report Post  
Posted to microsoft.public.excel.programming
JNW JNW is offline
external usenet poster
 
Posts: 480
Default How do I alter this AutoSave code?

You could try placing application.displayalerts = false before calling
autosave. Make sure to turn it back on afterwards.
--
JNW


"ed" wrote:

There is a workbook used by many different users in my department. We
encounter a problem when someone opens the workbook and then forgets to close
it.

To eliminate this problem, I wrote in some code that automatically closes
the workbook after it has been open for 20 minutes. The procedure works fine
but I have a glitch. I (and I'm assuming others as well) run AutoSave (set
to prompt before saving). The problem occurs when the autosave promt comes
up and I don't respond to the prompt. When this happens, the procedure I
wrote is suspended until I respond to the prompt.

The following code runs the autosave.

Application.Run Range("AUTOSAVE.XLA!mcs02.OnTime")

Can I do something to surpress this line when the workbook is opened or when
this line attempts to run?

-

Also, it would work better if I could set the workbook to close if the
window for that workbook has been inactive for 3 minutes instead of
automatically after 20 minutes. Can anyone suggest something I could use for
that?

any suggestions are appreciated.

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
alter code to apply to range (links cells w/ row insertions) purplec0ws Excel Discussion (Misc queries) 1 November 10th 09 10:19 AM
Alter pivot with code Steve Excel Discussion (Misc queries) 0 November 7th 07 09:23 PM
macro to alter worksheet code cwwolfdog Excel Programming 1 March 31st 05 03:29 PM
Help to alter code slightly novicevbaer[_13_] Excel Programming 4 November 22nd 04 08:12 PM
Alter existing code gav meredith Excel Programming 5 April 20th 04 09:03 AM


All times are GMT +1. The time now is 01:55 AM.

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"