ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Enable Macros with a Macro! (https://www.excelbanter.com/excel-discussion-misc-queries/131640-enable-macros-macro.html)

Mark[_2_]

Enable Macros with a Macro!
 
What code do I need to ensure that when I open a spreadsheet macros are
automatically enabled in security rather than the programme giving the
option via the security tab?

I suppose it can't be done otherwise it could be exploited maliciously?

Mark



Gary''s Student

Enable Macros with a Macro!
 
I don't think that you can enable macros with a macro.

How would the enabler every get executed??

Here is something to investigate:

Operating systems like Win XP allow more than one "user account" to be
created. Is it possible to create a dummy account for yourself that would
default to a medium or low security level and leave your regular account with
better protection?? I don't know.
--
Gary''s Student
gsnu200707


"Mark" wrote:

What code do I need to ensure that when I open a spreadsheet macros are
automatically enabled in security rather than the programme giving the
option via the security tab?

I suppose it can't be done otherwise it could be exploited maliciously?

Mark




Pete_UK

Enable Macros with a Macro!
 
That is correct. What some people do is to have an on-close macro
which hides all the sheets and reveals another sheet which says " ...
you must enable macros to use this file ..." and saves the file.
Another on-open macro hides this warning sheet and reveals the other
sheets, as well as calling your controlling macro.

Hence, if a User does not accept macros when opening the file, all
that will be seen is the warning sheet.

This link shows how you can do this:

http://www.danielklann.com/excel/for...be_enabled.htm

Hope this helps.

Pete

On Feb 21, 5:23 pm, "Mark" wrote:
What code do I need to ensure that when I open a spreadsheet macros are
automatically enabled in security rather than the programme giving the
option via the security tab?

I suppose it can't be done otherwise it could be exploited maliciously?

Mark




Dave Peterson

Enable Macros with a Macro!
 
Another way to accomplish this is to give the real workbook a password to open.

Then give the users a secondary workbook that opens that workbook (supplying the
password) and then closes itself.

If the user doesn't allow macros to run on this "helper" workbook, then the
other workbook is not opened.

If the user allows macros on the helper workbook, then the other workbook will
be opened with macros enabled.



Mark wrote:

What code do I need to ensure that when I open a spreadsheet macros are
automatically enabled in security rather than the programme giving the
option via the security tab?

I suppose it can't be done otherwise it could be exploited maliciously?

Mark


--

Dave Peterson


All times are GMT +1. The time now is 02:42 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com