Thread: File Protection
View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Jean-Yves[_2_] Jean-Yves[_2_] is offline
external usenet poster
 
Posts: 253
Default File Protection

Hi,
Create a new "welcome" worksheet with a text like "Enable macro on open
In the workbook before close event, hide all sheets (xlVeryHidden) except
the new one.
On open, make all visible and hide the welcome sheet.
Regards
JY
"ChasAA" wrote in message
...
Hello All,
I would like to develop a VBA whereby users are only able to access the
Excel file if they run the VBA code. Is there any way of doing this.

I can stop users (via code):

Closing Userforms etc.
Deleting/Adding rows and columns
Disable the menu

Another thing I thought was to protect the Workbook and only Unprotect it
via VBA code.

If the user choses "Disable Macros" at the security prompt, then they will
have full access to the data. Is there a way to stop this.

Reason why I want this is because the application will be one where
employess can book their annual leave. Each person has a limited number
of
days they can book and on each day only a limited number of employees can
be
off.

As you can imagine if they have full access they can book what they want!

Any suggestions as to what I can do?

Thanks in advance.

Chas