Disabled macros

C

Curt

After all this time I have a program that does fine on my comp. When I put it
on another it says go to online help for macros enable. On my comp when I
open it asks to enable. Is there any code that I can put into excel to have
it enable when opening or to display screen that allows enable. Have become
aware of security settings. Assumeing they are high on foreign comp.
Thanks for any assistance.
 
S

Shasur

Hi

Can you check if Application.AutomationSecurity helps you

Sub Security()
Dim secAutomation As MsoAutomationSecurity

secAutomation = Application.AutomationSecurity

Application.AutomationSecurity = msoAutomationSecurityByUI
Workbooks.Open (sFileName)

Application.AutomationSecurity = secAutomation

End Sub

Cheers
Shasur
 
R

Rick Rothstein

You cannot force a system with "high security settings" to run your code.
Think about it. First, how would that code run if the security settings stop
code from running? Second, if you were able to do that, it would defeat the
purpose of having security settings in the first place. If your user is to
be able to run your macros, they will have to adjust their Excel settings to
either permit macros to run directly (not advisable) or to prompt them if it
is alright to run macros (better).
 
C

Curt

My problem is getting to the promp screen to allow macros to run. Does
security need to be reset to allow this screen to apear in excel? If so then
I will create a doc to explain how to do it. Novices as we are we are getting
there.
Thanks for assistance
 
G

Gord Dibben

If security is set at high or very high the user will not get the prompt and
macros will be diabled.

Security set to medium prior to the workbook being opened will raise the
prompt.

If the workbook is signed and trusted, no prompt will appear but macros will
be enabled.


Gord Dibben MS Excel MVP
 
C

Curt

Is there any difference in the settings between XP & Vista in security
settings. Both my comp & another are set on medium high. Mine gives a choice
to enable macros the other running Vista with office 2000 same as me asks to
go to online help to enable. I will go back to other comp next week and try
lower settings. As you said medium I hope that is medium high.
Thanks for the input Sure does make a person have confidence when you have
mor knowledgeable one to turn to.
Thanks Again
 
G

Gord Dibben

XP and Vista are operating systems and should have no bearing on security
options in Excel but I don't run Vista so not sure.

You are changing the securioty settings in Excel, right?

I never heard of a "medium high" setting but then I have never used Excell
2000 either.


Gord
 
C

Curt

May Your Christmass be as great as mine. Thanks to all for the help. All most
2 years of working I now have a program that can help many. Without all of
you I could have never accomplished this effort.
Thanks Again Merry Christmass
 
G

Gord Dibben

Good to hear that.

Merry Christmas

May Your Christmass be as great as mine. Thanks to all for the help. All most
2 years of working I now have a program that can help many. Without all of
you I could have never accomplished this effort.
Thanks Again Merry Christmass
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top