Need a psswd verification form to open when the file is opened
Thanks Madiya -- I think protecting the workbook will do. Thanks for the
suggestion on protecting my VBA Project - I've done this now.
The question I still have is whether or not I can have a custom message or
if I can cusotmize the message that comes up when someone enters an invalid
password or selects the 'Cancel' button when prompted for the password.
Thanks!
Robert
"Madiya" wrote:
I think it is possible. If not fully secure, security can be enhanced
to some extent. Or for that reason, security is always too week in
excel and any password can be cracked. Many code snippets and softwares
are available on net for free of cost. So the best thing is not to rely
on the excel security. Having said that, here is the solution.
While absolute protection may not be available, try putting a dummy
sheet with instructions on how to enable macros to access the file.
Hide all the sheets except dummy (xlveryhidden) in "before close"
event.
In workbook open event, check and verify the password. Depending on
password, make all the relavent sheets visible and hide
(xlveryhidden) the dummy sheet. This way if macro is disabled, your
data sheets will remain hidden and if macro is enabled, data sheets
will be displayed. Be sure to password protect your VBA Project also
along with checking the "Lock project for viewing" so that even after
getting access to sheets with proper passwords, one can not see the
others passwords.
Hope this is of some help.
Regards,
Madiya
|