Solved

Access VBA - errors manipulating a linked spreadsheet

Posted on 2011-03-08
5
379 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

This article is a continuation or rather an extension from Cascading Combos (http://www.experts-exchange.com/A_5949.html) and builds on examples developed in detail there. It should be understandable alone, but I recommend reading the previous artic…
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…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
Using Microsoft Access, learn some simple rules for how to construct tables in a relational database. Split up all multi-value fields into single values: Split up fields that belong to other things into separate tables: Make sure that all record…

911 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

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now