PDA

View Full Version : A Custom UI code to do ...



Esmatullah
01-05-2013, 07:39 PM
Hi to All!
I need a Custom UI code that can enable macros running in a PC on its own. I mean when i open my file without my permission it must enable the macros. Or A code that can enable the macro disabling.

jignesh142
01-05-2013, 09:08 PM
to autorun it ,

Put it in this workbook module and put it in workbook load event

Esmatullah
01-06-2013, 05:59 AM
I don't want to autorun it. I want that windows or Microsoft Excel can't disable it by using a Custom UI code. Or another way that can do the work i want.

BrianMH
01-06-2013, 06:19 AM
I don't think there is any code that can disable security settings. It would make the security settings useless if someone could just disable them with out user input.

Paul_Hossler
01-06-2013, 07:52 AM
Put it in a Trusted Location (2007/2010 only)

Paul

Kenneth Hobs
01-06-2013, 10:49 AM
Do you mean that you want macros enabled when your xlsm is opened? We have discussed this in the past. Your macro would hide all sheets but one when it closes. When it opens, it would enable all sheets. Of course VBA Project needs to be password protected.

Paul_Hossler
01-06-2013, 11:36 AM
Do you mean that you want macros enabled when your xlsm is opened? We have discussed this in the past. Your macro would hide all sheets but one when it closes. When it opens, it would enable all sheets. Of course VBA Project needs to be password protected.


I've only ever seen used to force the user to enable macros

If the OP is looking to bypass the [Enable Macros] security prompt entirely, Trusted Locations is the only way I've ever found.

I would like to know if there's another way

Paul

snb
01-06-2013, 04:02 PM
If your application has any merit for the user (s)he will be eager to enable macros.....

Esmatullah
01-07-2013, 02:13 AM
Hi dears!
I am thinking your dears mean that i add my file location in trusted Location. I am right or not. Please Help

jignesh142
01-07-2013, 03:36 AM
One way is that you can get your macros digitally signed. In that way it will not show security setting to load every time and the macros will be considered as trusted.

Esmatullah
01-08-2013, 12:10 AM
Dear jignesh142!
How I can get my macros digitally signed. Please help me.

snb
01-08-2013, 02:07 AM
Use the help in the VBEditor: lemma digital signature.

Aflatoon
01-08-2013, 02:17 AM
That is still no guarantee - it is perfectly possible for a user to have "Disable all macros" set.

jignesh142
01-08-2013, 05:00 AM
Please visit the link for getting your macros digitally signed

http://office.microsoft.com/en-in/excel-help/digitally-sign-a-macro-project-HA001231781.aspx