Accessing an Excel file which has macros

J

jamesp

I have written some code which opens another file which has macros and
extracts data. I don't need to run any macros in this other file. Is there
a way of turning off the button to run macros when the other file opens up?
Also I'm doing this in 2003 at the mo but is there any difference with 2007?

Many thanks

James
 
M

Maury Markowitz

I have written some code which opens another file which has macros and
extracts data.  I don't need to run any macros in this other file.  Is there
a way of turning off the button to run macros when the other file opens up?  

Which button are you referring to? Is this a button that you have
placed in a sheet, or the menu item under Tools and it's counterpart
in the Toolbar. If it's the later, your best bet is to simply remove
the Macro Toolbar from the machines where this might be run.

Maury
 
S

Simon Lloyd

You could use this line of code but you need to be more specific on wha
button where

Code
-------------------
Application.EnableEvents = Fals
-------------------
you would have to tie it in with an IF statement so it will only be use
I have written some code which opens another file which has macros an
extracts data. I don't need to run any macros in this other file. I
ther
a way of turning off the button to run macros when the other file open
up
Also I'm doing this in 2003 at the mo but is there any difference wit
2007

Many thank

Jame

--
Simon Lloy

Regards,
Simon Lloyd
'The Code Cage' (http://www.thecodecage.com
 
J

jamesp

It comes up when you try to open the file and before it opens you get the
'Security warning' dialog box with 'Macros may contain viruses...' and then
the user has to click on either the 'Disable macros' or 'Enable Macros'
button to open.

Programically, i don't want to see this dialog box.

Does this make sense?

Thanks

James
 
Top