Updating Charts by a VBA code

  • Thread starter Thread starter Abhijat
  • Start date Start date
A

Abhijat

Hi Group,
Here is my query.
I have created a column chart in an excel and now I want to update it
using a VBA code. I am able to do it but the trouble is, the format,
legends, etc. get changed.
The desired result should be something like this.
Once I select the criterion from the drop-down, only the corresponding
data in the chart should change. Nothing in terms of formatting or
legends or X/Y axis should change.

Kindly suggest a way out.

Regards,
Abhijat
 
An easy solution, non-VBA, is to use named ranges for your charts. If
the named ranges are based on spreadsheet contents, either cells or
controls, you can just change those contents and the chart
automatically updates as the area referenced by the named range
changes.

For an example, take a look at FunChrt7.zip from http://www.bmsltd.co.uk/Excel/Default.htm
 
If you posted the code that didn't work the way you expected, someone might
be able to suggest some simple changes.

- Jon
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top