Thread: using names
View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
hke[_15_] hke[_15_] is offline
external usenet poster
 
Posts: 1
Default using names


Thanks for your answers, and I guess local function names are not s
cool then.

I tried

ActiveWorkbook.Names.Add Name:="myX", RefersToR1C1:= _
"=OFFSET(sheet1!R10C7,0,0,1,sheet2!R7C2)"

and for the Values

ActiveWorkbook.Names.Add Name:="myY", RefersToR1C1:= _
"=OFFSET(sheet1!R93C7,0,0,1,sheet2!R7C2)"

, with


Set Currentchart = ChtObj.Chart
Currentchart.ChartType = xlXYScatterLines
Currentchart.Location Whe=xlLocationAsObject
Name:=ActiveSheet.Name
Set srs = Currentchart.SeriesCollection.NewSeries

srs.XValues = myX
srs.Values = myY

btw is
srs.Values = myY
the right way to do this?

Running my macro creates a chart but the Values are gone!
With my first approach with myX and myYIDV defined manually
(insert-names-define) using the disputed FORSKYVNING it worked fine.

I`m lost

--
hk
-----------------------------------------------------------------------
hke's Profile: http://www.excelforum.com/member.php...nfo&userid=155
View this thread: http://www.excelforum.com/showthread.php?threadid=27411