Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I am relatively new to Excel programming. I am trying to
generate an Excel chart with different data ranges. I've been able to select a range of cells for the data that I want to Chart --Range(Selection, Selection.End(xlDown)).Select-- I was trying to store the address into a variable to be used later, i.e., --DataRange = Selection.Address-- I was going to use this variable to put into --ActiveChart.SetSourceData Source:=DataRange _ , PlotBy:=xlColumns But it generates an error stating that '.Address' is an invalid property of Selection. I've been trying all kinds of different objects and properties for over 3 hours. It seems like a simple thing to do. But.......Help Jack |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Jack;
If I understand you just leave off the .address and use selection by itself. Thanks, Greg -----Original Message----- I am relatively new to Excel programming. I am trying to generate an Excel chart with different data ranges. I've been able to select a range of cells for the data that I want to Chart --Range(Selection, Selection.End(xlDown)).Select-- I was trying to store the address into a variable to be used later, i.e., --DataRange = Selection.Address-- I was going to use this variable to put into --ActiveChart.SetSourceData Source:=DataRange _ , PlotBy:=xlColumns But it generates an error stating that '.Address' is an invalid property of Selection. I've been trying all kinds of different objects and properties for over 3 hours. It seems like a simple thing to do. But.......Help Jack . |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Greg
I tried this: Range(Selection, Selection.End(xlDown)).Select DataRange = Selection Charts.Add ActiveChart.ChartType = xlXYScatter ActiveChart.SetSourceData Source:=Range(DataRange) _ , PlotBy:=xlColumns I got: Method 'Range' of Object '_Global' failed Jack -----Original Message----- Jack; If I understand you just leave off the .address and use selection by itself. Thanks, Greg -----Original Message----- I am relatively new to Excel programming. I am trying to generate an Excel chart with different data ranges. I've been able to select a range of cells for the data that I want to Chart --Range(Selection, Selection.End(xlDown)).Select-- I was trying to store the address into a variable to be used later, i.e., --DataRange = Selection.Address-- I was going to use this variable to put into --ActiveChart.SetSourceData Source:=DataRange _ , PlotBy:=xlColumns But it generates an error stating that '.Address' is an invalid property of Selection. I've been trying all kinds of different objects and properties for over 3 hours. It seems like a simple thing to do. But.......Help Jack . . |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
How to create a range address with ADDRESS function? | Excel Worksheet Functions | |||
Variable Address in FROM WEB tool? | Excel Discussion (Misc queries) | |||
Inputbox to return address of cell selected by mouse | Excel Programming | |||
Problem trying to us a range variable as an array variable | Excel Programming |