Solved

Access VBA - errors manipulating a linked spreadsheet

Posted on 2011-03-08
5
389 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Online Training Solution

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action. Forget about retraining and skyrocket knowledge retention rates.

Question has a verified solution.

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

Suggested Solutions

It’s been over a month into 2017, and there is already a sophisticated Gmail phishing email making it rounds. New techniques and tactics, have given hackers a way to authentically impersonate your contacts.How it Works The attack works by targeti…
In Part II of this series, I will discuss how to identify all open instances of Excel and enumerate the workbooks, spreadsheets, and named ranges within each of those instances.
Learn how to number pages in an Access report over each group. Activate two pass printing by referencing the pages property: Add code to the Page Footers OnFormat event to capture the pages as there occur for each group. Use the pages property to …
In Microsoft Access, learn different ways of passing a string value within a string argument. Also learn what a “Type Mis-match” error is about.

734 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