How to force Excel to turn on macro when open?

hon

Board Regular
Joined
Oct 10, 2005
Messages
73
Last night, our discussion led to the conclusion that it is impossible to remove the macro on filesave as it depends on the user turning on the macro in the first place.

Today, I concluded that it is impossible to force users to turn on the macro. But my last question is 'Is it possible not to load macro when a user chooses not to turn on the macro?' (by some form of setting I was hoping). I guess it is not possible either :(
 

Tom Urtis

MrExcel MVP
Joined
Feb 10, 2002
Messages
11,197
hon said:
Last night, our discussion led to the conclusion that it is impossible to remove the macro on filesave as it depends on the user turning on the macro in the first place.
It concluded with the ability for the administrator of the file in your comapny's intranet creating a new workbook with the macro I posted, to delete all code out of the subject workbook, and send that to the final destination user, unless, as Isaid then the code removal is done manually by said admin if this is a one time deal.

hon said:
Today, I concluded that it is impossible to force users to turn on the macro.
If that means, impossible to enable another user's macro securtty settings, then your conclusion is correct, it's impossible.

hon said:
But my last question is 'Is it possible not to load macro when a user chooses not to turn on the macro?' (by some form of setting I was hoping). I guess it is not possible either :(
If you mean, somehow delete the code in the workbook if the user does not enable macros, the answer is no, since it would require automation to do so that is disallowed at that point by the user. As you have seen, there is a way to tell the user the consequences of not enabling their macros, because now they won't get the benefit of the coded enhancements, but you cannot force them to do anything or make the workbook "not load code" if the local settings do not allow for macro execution.
 

hon

Board Regular
Joined
Oct 10, 2005
Messages
73
"not to load macro when a user chooses not to turn on the macro"

It would be a very handy feature if Microsoft can implement it in future releases.
 

pfarmer

Well-known Member
Joined
Jul 6, 2005
Messages
550
hon said:
Just want to find out if it is possible to force Excel to turn on macro when open.
You can't force Excel to enable macros on start. However for the most part you can force the user to do so to use the sheet.

To do this do a search on the subject and note that you can make various sheets hidden with a macro when the workbook is closed. If you were then to reopen the workbook without macros enabled then the sheets you want to use are hidden, possibly with only one available telling the user to restart with macros enabled, if he does then that sheet gets hidden and the others are unhidden.

If you don't want to allow them to save the sheet to a location other then the desired location then use a macro to disable the various save commands from the menu and use a save button.

Personally on a properly protected network, I think there should be a way of autoenabling macros possibly with a runtime version of excel for those files.
That is if a workbook is located in a protected location it would be launched with a runtime version of excel where the security issue of the macro would not be an issue since an administrator would place it there in the first place.

Perry
 

Forum statistics

Threads
1,086,235
Messages
5,388,624
Members
402,127
Latest member
Jemx

Some videos you may like

This Week's Hot Topics

Top