Home |
Search |
Today's Posts |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Of course. I was indicating that perhaps Range("") needs to be more fully
qualified. - Jon ------- Jon Peltier, Microsoft Excel MVP Peltier Technical Services Tutorials and Custom Solutions http://PeltierTech.com/ _______ "Peter T" <peter_t@discussions wrote in message ... Hi Jon, ActiveSheet.Range("myNamedRange") would fail if "myNamedRange" refers to a range that's not on the ActiveSheet Regards, Peter T "Jon Peltier" wrote in message ... ActiveChart.SetSourceData Source:=ActiveSheet.Range("myNamedRange") ', etc - Jon ------- Jon Peltier, Microsoft Excel MVP Peltier Technical Services Tutorials and Custom Solutions http://PeltierTech.com/ _______ "Peter T" <peter_t@discussions wrote in message ... Hi Dylan, Try ActiveChart.SetSourceData Source:=Range("myNamedRange") ', etc Regards, Peter T "Dyl" wrote in message oups.com... Hi, I am trying to use a named Range which has been set in an earlier function to use as the SourceData for a chart being created in excel/vba code. My code looks like this: ActiveChart.SetSourceData Source:=XValues, PlotBy:=xlRows When I run this code, only one cell's value from the "XValues" Range appears on the X-Axis. I know the range consists of more than one cell with different values. I have also tried setting PlotBy = xlColumns and that does not work either. I can create the graph just fine when I select the range and and create a chart without vba. I guess one option would be to select the range and see if that works, but I don't really like to select cells in the code, but if that's the only option, I'll do it. Is there something I should be doing differently? Thanks, Dylan |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Dynamic Named Range for a Chart | Excel Discussion (Misc queries) | |||
Chart using named range | Excel Discussion (Misc queries) | |||
need help using named range in chart | Charts and Charting in Excel | |||
Can I use named range in data range box when creating pie chart? | Charts and Charting in Excel | |||
named range refers to: in a chart | Excel Discussion (Misc queries) |