Contact US

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Approach 9.5 Close Script

Approach 9.5 Close Script

Approach 9.5 Close Script

I would like a script to run if my opproach database is not used for a specified amount of time, ( the script will close approach without saving) this is to ensure that the database is not left open as automated tasks run over night. any help would be very greatfull. Thankx

RE: Approach 9.5 Close Script

There is a "TimerInterval" property you can set to any value you want. For example, you could set it in a SwitchTo event for a form view switch that occurs via a macro named OPEN when your APR is opened:

' Set the timer interval for the current view to 15 seconds.
CurrentApplication.ActiveView.TimerInterval = 15000

When the TimerInterval expires, the "UserTimer" event is raised for the same view you started it on, so you can put code in that event to check for activity and either close or simply reinitialize the timer.

The main problem with this technique is determining whether the user is still active. So most people who use this technique simply check the current time and if it is after say 8PM, they close the APR. Another method if the interval is set to something like 20 minutes so as to not annoy the user is to pop up a dialog with a message asking the user if they want to continue and give them a couple of minutes to respond. If they do not, close the APR.

Sue Sloan

RE: Approach 9.5 Close Script

Thank you for replying to may question, about the close .apr after or at a certian time, I have tried this but cannot get it to work, i am quite a novice with approach. would you be able to give me an example of approach closing at a certian time, in script. it would be very much appreciated. thanks Jamie.

RE: Approach 9.5 Close Script

Sorry sue I have now managed to get the .apr file to close after a period of time, but i cant figure out how to get it to close at a specific time or if the active view has been idle for X amount of time.

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close