Refresh Excel data linked to Access?

M

Mike Collard

Does anyone know how to refresh an Excel spreadsheet from
code in Access?

I have a spreadsheet linked to an Access query and a
Powerpoint presentation linked to the Excel spreadsheet.
I need to refresh the Excel data and save the file and
then refresh Powerpoint.

I can refresh the Excel data with suitable code in the
Workbook_Open module e.g. ActiveWorkbook.Refreshall but
that means I have to open and close the spreadsheet
manually.

If I try to incorporate similar code in an Access
procedure by setting up a reference to the Excel
application object then an error is generated when it
tries to refresh the data - the user is prompted to login
to Access and 'ODBC MS Access Driver Login Failed' is
displayed.

If I can refresh the Excel spreadsheet OK is there similar
code to refresh the Powerpoint charts as well?

Thanks

Mike Collard
 

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