change all range in chart

M

Mark

I operate on diffirent charts and use different range in
one chart. My chart is update and loaded to userform -
application (excel) is hide. My charts is object variable -
not ActiveChart (!!)
All work fine while label of axis x is invariable.
I'd like change range data, who have different label of
axis x.
How can make progress - please help.

part of my code below:
Set CurrentChart = Sheets("Charts").ChartObjects
(ChartNum).Chart
.....
e.g
With Sheets("charts").ChartObjects(ChartNum).Chart
.HasTitle = True
.ChartTitle.Text =Title 1"
.SeriesCollection(2).Values = "='File.xls'!rg1" ' change
range

.SeriesCollection(1).XValues = "=='File.xls'!rgXV1" '
this is not work!!!!! invalid reference

Best regards Mark
 
T

Tom Ogilvy

.SeriesCollection(2).Values = "='[File.xls]Sheet1'!" & rg1.Address


.SeriesCollection(1).XValues = "='[File.xls]Sheet1'!" & rgXV1.Address
 

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

Top