Macro to Refresh from Access

K

klav

I have an excel spreadsheet (called "2009info") that is linked to an Access
database and I'm opening this spreadsheet with a macro (this macro is pulling
data from various spreadsheets and this is only one of them).

Even though the spreadsheet "2009info" is set up to refresh upon opening, it
does not refresh unless I manually select the refresh button. So I thought
I'd use the following command in my macro to do the refresh:

ActiveWorkbook.RefreshAll

This command works when I step through the macro but does not work when I
simply generate the entire macro. Does anyone know why this would be
happening and what can I do to get around this?
 

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