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,081,767
Messages
5,361,164
Members
400,617
Latest member
barron1

Some videos you may like

This Week's Hot Topics

  • populate from drop list with multiple tables
    Hi All, i have a drop list that displays data, what i want is when i select one of those from the list to populate text from different tables on...
  • Find list of words from sheet2 in sheet1 before a comma and extract text vba
    Hi Friends, Trying to find the solution on my task. But did not find suitable one to the need. Here is my query and sample file with details...
  • Dynamic Formula entry - VBA code sought
    Hello, really hope one of you experts can help with this - i've spent hours on this and getting no-where. .I have a set of data (more rows than...
  • Listbox Header
    Have a named range called "AccidentsHeader" Within my code I have: [CODE]Private Sub CommandButton1_Click() ListBox1.RowSource =...
  • Complex Heat Map using conditional formatting
    Good day excel world. I have a concern. Below link have a list of countries that carries each country unique data. [URL...
  • Conditional formatting
    Hi good morning, hope you can help me please, I have cells P4:P54 and if this cell is equal to 1 then i want row O to say "Fully Utilised" and to...
Top