Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Plot Ranges
I can write
With ActiveChart .ChartType = xlXYScatterLinesNoMarkers .SetSourceData Source:=Sheets(1).Range(Cells(1, 1), Cells(15, 2)) End With but this doesn't work setrA = Sheets(1).Range(Cells(1, 1), Cells(15, 2)) With ActiveChart .ChartType = xlXYScatterLinesNoMarkers .SetSourceData Source:=rA End With Can someone explain why? [I don't want just a fix, but an understanding of plotting procedures. TIA, Mike |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Plot Ranges
When you use the With ActiveChart and then tell it the source is in in
Range(Cells.... it does not find Cells with ActiveChart. Although you thought you qualified the Cells with Worksheets(1), VBA don't acknowledge it. So in the second case where you first qualified the range by setting it to Worksheets(1) in a variable before trying to apply it, it does acknowledge it. I do the same thing repetitively and I should know better. "MikeM" wrote: I can write With ActiveChart .ChartType = xlXYScatterLinesNoMarkers .SetSourceData Source:=Sheets(1).Range(Cells(1, 1), Cells(15, 2)) End With but this doesn't work setrA = Sheets(1).Range(Cells(1, 1), Cells(15, 2)) With ActiveChart .ChartType = xlXYScatterLinesNoMarkers .SetSourceData Source:=rA End With Can someone explain why? [I don't want just a fix, but an understanding of plotting procedures. TIA, Mike |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Plot Ranges
Actually, the opposite is true. The first version worked but the second didn't.
"JLGWhiz" wrote: When you use the With ActiveChart and then tell it the source is in in Range(Cells.... it does not find Cells with ActiveChart. Although you thought you qualified the Cells with Worksheets(1), VBA don't acknowledge it. So in the second case where you first qualified the range by setting it to Worksheets(1) in a variable before trying to apply it, it does acknowledge it. I do the same thing repetitively and I should know better. "MikeM" wrote: I can write With ActiveChart .ChartType = xlXYScatterLinesNoMarkers .SetSourceData Source:=Sheets(1).Range(Cells(1, 1), Cells(15, 2)) End With but this doesn't work setrA = Sheets(1).Range(Cells(1, 1), Cells(15, 2)) With ActiveChart .ChartType = xlXYScatterLinesNoMarkers .SetSourceData Source:=rA End With Can someone explain why? [I don't want just a fix, but an understanding of plotting procedures. TIA, Mike |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Removing Plot lines between plot points on a line chart | Charts and Charting in Excel | |||
How to plot Date Ranges on Same Graph | Charts and Charting in Excel | |||
How to change empty ranges from a plot series without generating e | Excel Worksheet Functions | |||
can i change plot area colors for different date ranges | Charts and Charting in Excel | |||
How do I automatically plot different ranges of data in different. | Charts and Charting in Excel |