Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default Disabling/Enabling Macros

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!
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Disabling/Enabling Macros

Not as you state - because it is a bit of a contradiction.

However, you can hide all or some of the sheets (except one that says
"Please enable macros" ?) so it can only be viewed/used as you wish.



------------------------------------------------
~~ Message posted from http://www.ExcelTip.com/
~~ View and post usenet messages directly from http://www.ExcelForum.com/

  #3   Report Post  
Posted to microsoft.public.excel.programming
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!



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
enabling/disabling a set of code from within a spreadsheet sheet Roger on Excel Excel Discussion (Misc queries) 2 November 17th 07 05:04 PM
Enabling macros Pennington Excel Worksheet Functions 1 December 2nd 04 07:43 PM
Enabling macros Tom Ogilvy Excel Programming 0 August 18th 03 03:48 PM
Enabling/Disabling Macros David Excel Programming 6 August 12th 03 06:21 PM
Add PivotItems to PivotTable / Enabling - Disabling PivotItems Ole[_3_] Excel Programming 1 July 8th 03 03:24 PM


All times are GMT +1. The time now is 05:32 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"