How to force Excel to turn on macro when open?

hon

Board Regular
Joined
Oct 10, 2005
Messages
73
Just want to find out if it is possible to force Excel to turn on macro when open.
 
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 :(
 
Upvote 0

Excel Facts

Can a formula spear through sheets?
Use =SUM(January:December!E7) to sum E7 on all of the sheets from January through December
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.
 
Upvote 0
"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.
 
Upvote 0
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
 
Upvote 0

Forum statistics

Threads
1,214,797
Messages
6,121,629
Members
449,041
Latest member
Postman24

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top