You could use alternative approaches to read the data, for example:
How To Use ADO with Excel Data from Visual Basic or VBA
http://support.microsoft.com/kb/257819
How is Access opening the Excel workbooks? If you use VBA to open a document
with macros in an instance of its parent application, the fact that VBA is
running counts as an approval to run code, so you should not be warned.
- Jon
-------
Jon Peltier, Microsoft Excel MVP
Tutorials and Custom Solutions
Peltier Technical Services, Inc. -
http://PeltierTech.com
_______
"Dale Fye" <(E-Mail Removed)> wrote in message
news:506EFD7E-EE98-4483-A04C-(E-Mail Removed)...
>I have an Access application that is opening a number of Excel spreadsheets
> and reading data from them. Each of these spreadsheets has the same
> macros,
> which I want to disable when I open the workbook, rather than having to
> click
> the pop-up window that asks if I want to enable/disable macros.
>
> Is there a way to do this using Excel automation? How about using API
> calls? My intent is that I would like to read the current setting, change
> the setting to disable macros, read in the files, then reset the setting
> to
> its original value.
>
> --
> Don''t forget to rate the post if it was helpful!
>
> email address is invalid
> Please reply to newsgroup only.
>