restricting access to workbook

  • Thread starter Thread starter pam
  • Start date Start date
P

pam

Does anyone know what the code should be to restrict
opening a workbook using the now function. I want the
workbook to be able to be opened for a short time and
then after that time has expired( based upon the computer
clock) it won't open.
Any help would be appreciated.

Thanks
Pam
 
Pam, you could use something like this, in the this work book code, but all
someone would have to do is open the workbook with macros disabled, you
could also hide all sheet but one using xlVeryHidden and then unhide them
with code, but this can also be overcome

Private Sub Workbook_Open()
If Date > #12/25/03# Then
ThisWorkbook.Close
End If
End Sub

--
Paul B
Always backup your data before trying something new
Please post any response to the newsgroups so others can benefit from it
Feedback on answers is always appreciated!
Using Excel 97 & 2000
** remove news from my email address to reply by email **
 
Back
Top