Solved

Access VBA - errors manipulating a linked spreadsheet

Posted on 2011-03-08
5
382 Views
Last Modified: 2012-05-11
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
Comment
Question by:murbro
  • 3
  • 2
5 Comments
 
LVL 15

Accepted Solution

by:
Simon Ball earned 500 total points
ID: 35081206
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
 
LVL 15

Expert Comment

by:Simon Ball
ID: 35081230
you'll have to relink excel to look in the new "datastore"
0
 

Author Closing Comment

by:murbro
ID: 35085451
Thanks very much. Great answer!
0
 
LVL 15

Expert Comment

by:Simon Ball
ID: 35093022
My pleasure.  Did it all work ok then?
0
 

Author Comment

by:murbro
ID: 35093475
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

Migrating Your Company's PCs

To keep pace with competitors, businesses must keep employees productive, and that means providing them with the latest technology. This document provides the tips and tricks you need to help you migrate an outdated PC fleet to new desktops, laptops, and tablets.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction The Visual Basic for Applications (VBA) language is at the heart of every application that you write. It is your key to taking Access beyond the world of wizards into a world where anything is possible. This article introduces you to…
Preparing an email is something we should all take special care with – especially when the email is for somebody you may not know very well. The pressures of everyday working life stacked with a hectic office environment can make this a real challen…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
In Microsoft Access, when working with VBA, learn some techniques for writing readable and easily maintained code.

828 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question