How do I turn off macro warnings?

G

Guest

I'm running a macro in Excel from within Access using Automation. I'm new to
Automation and I figured out how to open and close an Excel workbook using
Access VBA. I want to format the data in the Excel workbook to currency
after a transferspreadsheet action from Access. So I wrote a little fomat
macro in Excel to run at the open event. In Access, I open the workbook and
the immediately close it just to run the format macro. The problem is, I
can't figure out how to turn the macro warning off. I just want to run the
macro without the user having to click "Enable Macros". Anyone know how to
turn those warnings off?

Thanks,

Jeff.
 
G

Guest

The short answer is you can't turn security warnings off. If you could then
anyone who wrote a virus would just turn them off. You can have every one
turn their security down to low but this would potenetially allow a virus to
get into the system. You can also look at digital signatures or trusted
sources. This starts to get a little dependant on your version of Excel so I
can't really comment further...

HTH
 
D

Darrin Henshaw

In Excel, go to Tools > Macro > Security. And set the security to low.
High won't run any Macros. Medium gives the message you have. And Low
doesn't do anything, allows to to run any code. NOTE: This setting stays
on the value you set. If you set it to low now, it will stay low for all
workbooks, until you manually change it.
 
L

Lee Peedin

I just stumbled on to the NG today and have been doing a lot of
"catch-up" reading. I do all my Excel programming via ooRexx ActiveX
and I have to take exception to Jim's statement "you can't turn
security warnings off". application.displayalerts = false sure turns
it off for me.

Lee
 

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