LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #12   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6,582
Default Chart with a defined named range?

Before you change the data source for a series, convert it to a column chart
style. After changing the source data, change it back to a line or XY chart
style. VBA sometimes chokes on Line or XY chart series if the series at
first contains no plottable data.

- Jon
-------
Jon Peltier, Microsoft Excel MVP
Tutorials and Custom Solutions
Peltier Technical Services, Inc. - http://PeltierTech.com
_______


"Matt S" wrote in message
...
ok, I tried making a range that does not include blank cells and I do not
get
the error. I will need to find a way to make a subset of the named ranges
that does not include blanks then plot it using the advice you all have
given
me.

Let me work on it for a while..
thanks,
Matt

"Matt S" wrote:

All,

Thanks so much for your suggestions. I still am receiving an error:
Run-time error '1004' Unable to set the XValues property of the Series
class

Part of my range are empty cells... could this be the reason why?

Thanks,
Matt

"Jon Peltier" wrote:

Use the name of the sheet that holds the name, and use syntax like
this:

ActiveChart.SeriesCollection(1).XValues = "='" & ActiveSheet.Name &
"'!TheRange"

Excel will fill in the appropriate local or global scope for the name

- Jon
-------
Jon Peltier, Microsoft Excel MVP
Tutorials and Custom Solutions
Peltier Technical Services, Inc. - http://PeltierTech.com
_______


"Peter T" <peter_t@discussions wrote in message
...
Your error description suggests you are running the code without
actually
selecting a chart, or maybe you've just created a chart that doesn't
yet
have a series. Beyond that the the syntax is not quite right

s = "='" & ActiveWorkbook.Name & "'!" & "Beginning_Timer"
s = "=Beginning_Timer"
ActiveChart.SeriesCollection(1).XValues = s

Obviously ensure a chart is active. Presumably the defined name is in
the
same workbook, otherwise change ActiveWorkbook.Name to "myBook.xls"
But if
working with a worksheet (local) name change use sheet-name.

Regards,
Peter T






"Matt S" wrote in message
...
I have a few ranges that are named within Excel. I'd like to chart
my
Beginning_Timer range against my Temp_Ramp range with a XY Scatter
plot.

If I put ActiveChart.SeriesCollection(1).XValues =
"=Beginning_Timer"
it gives me an error '91' Object variable or With Block variable not
set.

Help?
<3 Matt







 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to update a worksheet based on a defined named range using VB. Rambo[_4_] Excel Programming 0 March 23rd 08 07:32 AM
Defined named range (Array list) Sinner Excel Programming 2 February 16th 08 02:17 PM
VBA defined named range not appearing in Names list... George Excel Programming 13 October 15th 07 05:45 PM
Passing a named range into a user defined function Simon Shaw Excel Programming 2 March 15th 05 09:33 PM
Defined named range to array MattShoreson[_2_] Excel Programming 1 December 4th 03 10:06 AM


All times are GMT +1. The time now is 10:37 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"