View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Living the Dream Living the Dream is offline
external usenet poster
 
Posts: 151
Default Using the OnTimer event to lock out users between specific time window.

Hi Guy’s

Was wondering if it is possible, using the OnTimer Event in Workbook
OnOpen() whereby if a user tries to manually open an excel file titled
"Historical" between a specific time window ( 3.00pm to 4.00pm ) it will
not open, and instead pop up a message advising they cannot access the
file during this period.

One user needs total uninterrupted access to the "Historical" file
between this very important period of time, and no matter how many times
you circulate emails to other departments asking people to not have it
open during this time they just don’t listen or don’t care.

I am currently using the OnTimer Event to automatically close the
"Historical" File after 10 mins so other users do not inadvertently
leave it active.

As an interim prevention, I have also just changed the "Historical"
Files Attribute Property to ReadOnly to stop other users from altering
the Filters & Layout.

I have inserted some code behind the Main User's ( who needs access to
the "Historical" File ) Main File he works from which changes the
"Historical" File to Normal just prior to opening, then back to ReadOnly
when he is finished.

It may appear to be a case of overkill, but it’s the only way I can
educate people and stop them from preventing this very integral function
from taking place during the above time period.

Any assistance is appreciated

Cheers
Mick.