?
Solved

Excel VBA - Applyinging newly imported data range to a chart

Posted on 2013-01-07
4
Medium Priority
?
221 Views
Last Modified: 2013-01-07
Hi

I import data into Excel from both SQL and Access and generate fairly complex charts in Excel manually.
In the past I have encountered a lot of problems using Excel VBA to automate this so I want to rather apply the imported data range to each chart.
I need a few pointers on the best way to do this so that the chart doesn't lose any of its original structure.
0
Comment
Question by:Murray Brown
[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
  • 2
4 Comments
 
LVL 85

Accepted Solution

by:
Rory Archibald earned 2000 total points
ID: 38750126
There are different ways. If you have the imports set up as queries then using either structured references (2007 or later) or dynamic named ranges, you shouldn't really need to do anything other than refresh the queries.
Alternatively you can simply alter the data sources of the charts by looping and altering the XValues and Values properties of each series in the charts (I am assuming they are too complex for a simple SetSourceData statement).
0
 
LVL 40

Expert Comment

by:als315
ID: 38750205
0
 

Author Closing Comment

by:Murray Brown
ID: 38750420
Thanks very much
0
 

Author Comment

by:Murray Brown
ID: 38750428
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

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

This article will guide you to convert a grid from a picture into Excel format using Microsoft OneNote and no other 3rd party application.
This code takes an Excel list of URL’s and adds a header titled “URL List”. It then searches through all URL’s in column “A”, looking for duplicates. When a duplicate is found, it is moved to the top of the list. The duplicate URL’s are then highlig…
The viewer will learn how to create a normally distributed random variable in Excel, use a normal distribution to simulate the return on an investment over a period of years, Create a Monte Carlo simulation using a normal random variable, and calcul…
This Micro Tutorial will demonstrate in Microsoft Excel how to add style and sexy appeal to horizontal bar charts.

765 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