View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
John Wilson John Wilson is offline
external usenet poster
 
Posts: 550
Default Enabling/Disabling Macros

David,

Where are these security settings about macros to be found?

There's a good explanation in Excel (Tools/Macro/Security)

The security settings are PC (User) specific. If your workbook doesn't
depend on that macro to accomplish it's task, whatever settings
they open it with won't matter at all.

will I still be able to run the macro or will it be disabled for me

also?
If they e-mail the workbook to you and you have macros enabled,
you'll be able to run it (after you alter the code and comment out
that "Option Private Module" line of code)

I'd rather they not be confused by seeing
any reference to macros.

If they have security set to Medium, they'll see the warning.
If, as you say, it's not needed for the workbook and only
you will be running it on your PC, Ray's suggestion of placing
it in your Personal.xls workbook would seem like the best way
to go.

John



David wrote:

Thanks for the information.
Where are these security settings about macros to be found?
If I send a user my template and he opens it and
specifies 'disable macros', enters his data, saves it as
an XLS and sends it back to me, will I still be able to
run the macro or will it be disabled for me also?

By the way this macro does nothing dangerous, all it does
is perform calculations on the data entered and puts the
results in a new worksheet. Its just that its irrelevant
to the user so I'd rather they not be confused by seeing
any reference to macros.
- David

-----Original Message-----
David,

There are two parts to your question and different

answers for each.

I don't want any 'enable/disable macros Y/N'
popup windows appearing.

If a macro exists, it's going to be flagged when the

workbook opens.
If they have macros enabled, they won't get a warning.
If they have them disabled, they also won't get a warning.
If they have their security set to medium, they will get

the
warning.....but........you said
I don't want the users to be able to run the macro.

At the top of the module where the macro resides, place

the following:
Option Private Module
With the above option, any macros in that module won't

appear on the
macro run list. Of course, if they're fluent in VBA, they

could edit
that module and delete that line. You could protect the

VBA
project but that password can be cracked too (just a

warning)
Anyway, if you don't think they're capable of getting at

the code
the Option Private Module should keep their grubby fingers
from running your macro.

John

David wrote:

I have a template which contains a macro. I would prefer
the users who use this template not be aware the macro

is
there. i.e. I don't want any 'enable/disable macros Y/N'
popup windows appearing. I don't want the users to be

able
to run the macro.
The users will fill in the spreadsheet data and email it
back to me. I will then run the macro to create a new
worksheet from the enetered data.
Is this possible? Or, is there a better way to do it?


.