LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 93
Default building a range for SetSourceData

I am trying to build a range object to feed a chart input. I want to
move from old to new:


' OLD
myChart.SetSourceData Source:=Sheets("Main Sheet").Range( _
"DF71:IS71,DF73:IS73"), PlotBy:=xlRows

' NEW
myChart.SetSourceData Source:=ws , PlotBy:=xlRows



Here is the way I built the robj. I use the other range objects to
collect row and column info. What am I doing wrong?

Dim ws As Range
Set ws = myWs.Range( _
myWs.Range(myWs.Cells(Date_Week.row, FirstDataCol.Column),
myWs.Cells(Date_Week.row, LastDataCol.Column)), _
myWs.Range(myWs.Cells(Pool_Sum.row, FirstDataCol.Column),
myWs.Cells(Pool_Sum.row, LastDataCol.Column)))


The chart doesn't die, but the results are a mess.
Thank you

(I have verified in debug mode that the row and column numbers
returned by all ranges are correct)
 
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
problem building Function with worksheet name and range caroline Excel Programming 2 October 26th 09 07:20 PM
When building a chart Dates are been included that are not in thedate range Sh0t2bts Excel Worksheet Functions 1 October 14th 09 03:58 PM
Help with SetSourceData EAB1977 Excel Programming 1 October 12th 09 07:16 PM
setSourcedata tony wong Excel Programming 2 February 22nd 07 02:06 PM
Building a Named Range in a formula with VBA John[_80_] Excel Programming 1 July 7th 04 03:06 PM


All times are GMT +1. The time now is 04:40 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"