Can we require "Enable Macros" or else the file can't be opened?

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I used VBA to create a Login form upon entering an Excel file, but I noticed
that all the user has to do is either hold down the shift key when opening
the file, or choose 'Disable Macros', and then they get full access to the
file. Is there any way of programming to enforce them to 'Enable Macros' in
order to access the file. I.e., if they disable or use the shift key, the
file will not open? (I would rather use VBA to secure the file because of the
ease of purchasing an Excel password-cracking program). Thank you.
Patrick
 
Hi Patrick,

If the user disables macros, any coded potential solution is doomed to fail.
The fact is that Excel's level of security is lamentably low.

See the following Google search (keword = secure) for numerous previous
discussions and suggestions:

http://tinyurl.com/l7gn3
 
You cannot use VBA to prevent the user turning off macros.

Normal approach is to hide all sheets except for a "Please enable macros" sheet.
If macros are enabled on opening, then use VBA to hide the warning sheet and unhide all others.
 
Back
Top