macro permanent enable

leshem

New Member
Joined
Sep 23, 2002
Messages
49
H E L P
How can I enforce the system to enable the macro by any chance when the workbook is open, and that the dialog box of this meter will gone and not show up?
T H A N K S
 

Excel Facts

Difference between two dates
Secret function! Use =DATEDIF(A2,B2,"Y")&" years"&=DATEDIF(A2,B2,"YM")&" months"&=DATEDIF(A2,B2,"MD")&" days"
Hi leschem,

If you are just wanting to do this on your computer you can do it by setting your macro security level to low (Tools > Macro > Security > set Low option). Unfortunately this will cause macros in all workbooks you open to be automatically enabled, which makes you vulnerable to macro viruses. If you want more security by making this to apply to your workbook but not others you must get a Digital Certificate for your workbook that identifies it as being from a "trusted" source, and set your security level to Medium.

If you want your macros to be automatically enabled with others open your workbook, you are out of luck. After all, this is what macro security is all about--never automatically enabling a macro until the user identifies it as coming from a trusted source. The best you can do in this case is to force the user to enable macros in order for your workbook to be usable. If you want to know more about this, reply back.
 
Upvote 0
Hi Damon, Thanks for your answer.
Yes, I want to here more about the second option you offered as the Digital Certificat is not an option right now, for me any way.
The real thing that I want is that the dialog box that pops up when ever you open the work book and asks about Enable/Disable macro will not pop up and that the macros will turn, automatically on. I'm writting this application for a client so it sould work on his computers, mostly with Excel 97.
thnks agian and please let me know about other options if you know of any.
 
Upvote 0
Thanks for the links, but i still think there must be a way that by Code lines of VBA, there must be a way to leave it by the same security level and lose the pop up dialog box. all the ways were offered so far were dilling with how to go arround the problem but not focus on it.Please try to think of another option, Thanks in advance.
 
Upvote 0
to the best of my knowledge, and as indicated in Damon & others in the linked posts, it is not possible to avoid the 'enable macros' pop-up. 'Going around the problem' is your only option.

Paddy
 
Upvote 0
I thought so....
unfortunatly this is not good enough for my client, but I guess we will just have to stick with one of the "going around" advices.
:)
 
Upvote 0
Hi again leshem,

The ability to bypass the enable macros dialog would represent a HUGE security hole in Excel, and I'm sure that if such a hole were discovered it would be quickly patched via a security update service release from Microsoft.

Here is a outline of the workaround I mentioned earlier that forces the user to enable macros. The idea is simply to make the workbook unusable unless the user enables macros.

1. Hide and/or protect all the sheets in your workbook. If you hide sheets I recommend you make them xlVeryHidden so they do not even show up in the Unhide menu.

2. Insert a new worksheet and put a message on it (could be a textbox) that tells the user that macros must be enabled to use the workbook. This sheet will be the only one that is visible if the user doesn't enable macros.

3. Put code in the workbook's Open event that unhides/unprotects the hidden sheets and hides the new (message) worksheet.

4. Put code in the workbook's Close event that re-hides/protects the hidden sheets and unhides the new worksheet.

5. Password-protect your VBAProject so that users can't view your code and the passwords you use to unprotect/protect the worksheets.

Now your workbook is unusable unless opened with macros enabled since the Open event macro that unhides/unprotects the sheets only runs if macros are enabled.

I hope this helps.

Damon
 
Upvote 0

Forum statistics

Threads
1,203,625
Messages
6,056,381
Members
444,862
Latest member
more_resource23

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