View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Randy Harmelink Randy  Harmelink is offline
external usenet poster
 
Posts: 122
Default Updating Charts by a VBA code

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

On Jul 31, 1:09 am, Abhijat wrote:
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