View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
Tom Ogilvy Tom Ogilvy is offline
external usenet poster
 
Posts: 27,285
Default Disabling/Enabling Macros

You can make the workbook "unusable" by hiding sheets and so forth, then
having your macro unhide the sheets. However, you can not force a user to
enable macros with any sort of setting. You could put your code in a
separate addin and have the users select the addin or put it in their
xlstart directory.

No method is really foolproof.

--
Regards,
Tom Ogilvy

"HRobertson" wrote in message
...
I have created a form to be used by others at my company.
In order to submit this form, they must fill in all
mandatory fields. Therefore, I wrote a code using VBA,
that prevents the file from being saved unless all
mandatory fields have been entered. The only way this
works is if the macros are enabled when the user opens the
file. Is there a way to prevent the file from being open
unless the macros are enabled? In other words, can I
prevent this file from being used in they disable the
macros? Any help would be GREATLY appreciated. Thank you!