Solved

Excel VBA - Applyinging newly imported data range to a chart

Posted on 2013-01-07
4
220 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: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
  • 2
4 Comments
 
LVL 85

Accepted Solution

by:
Rory Archibald earned 500 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:murbro
ID: 38750420
Thanks very much
0
 

Author Comment

by:murbro
ID: 38750428
0

Featured Post

Creating Instructional Tutorials  

For Any Use & On Any Platform

Contextual Guidance at the moment of need helps your employees/users adopt software o& achieve even the most complex tasks instantly. Boost knowledge retention, software adoption & employee engagement with easy solution.

Question has a verified solution.

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

Introduction This Article briefly covers methods of calculating the NPV and IRR variants in Excel as well as the limitations in calculating and interpreting IRR results. Paraphrasing Richard Shockley, author of my favourite finance reference tex…
This article describes a serious pitfall that can happen when deleting shapes using VBA.
The viewer will learn how to use a discrete random variable to simulate the return on an investment over a period of years, create a Monte Carlo simulation using the discrete random variable, and create a graph to represent the possible returns over…
Many functions in Excel can make decisions. The most simple of these is the IF function: it returns a value depending on whether a condition you describe is true or false. Once you get the hang of using the IF function, you will find it easier to us…

729 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