Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 396
  • Last Modified:

Access VBA - errors manipulating a linked spreadsheet

Hi

I have an Access database that generates reports in Excel using charts. I had to do this because the Access charting system wasn't working as well. The Excel spreadsheet has tables that are linked to my Access tables. These Excel tables are in turn linked to Pivot Tables in the spreadsheet which are linked to the final charts. I am trying to use VBA to refresh these links and I am getting errors because the Excel spreadsheet cannot be opened at the same time as the Access database. Not sure how to get around this.
0
Murray Brown
Asked:
Murray Brown
  • 3
  • 2
1 Solution
 
Simon BallCommented:
I get a smiliar problem with access databases running mail merges in word through automation.

to get around it, i put the marge tables into a 2nd mdb, then linked them back to the main db.

that way, both the access mdb running the code,  and excel, can link to them at the same time.
0
 
Simon BallCommented:
you'll have to relink excel to look in the new "datastore"
0
 
Murray BrownMicrosoft Cloud Azure/Excel Solution DeveloperAuthor Commented:
Thanks very much. Great answer!
0
 
Simon BallCommented:
My pleasure.  Did it all work ok then?
0
 
Murray BrownMicrosoft Cloud Azure/Excel Solution DeveloperAuthor Commented:
Worked perfectly. I used make table queries, which made tables into the additional database.
I linked my spreadsheet to this database and refreshed from my master database. Appreciate the help.
Was causing a lot of trouble. Thanks very much!
0

Featured Post

NEW Veeam Agent for Microsoft Windows

Backup and recover physical and cloud-based servers and workstations, as well as endpoint devices that belong to remote users. Avoid downtime and data loss quickly and easily for Windows-based physical or public cloud-based workloads!

  • 3
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now