Hi
not tested but try:
ActiveWorkbook.Names.Add Name:="myX", RefersToR1C1:= _
"=OFFSET(sheet1!$G$10,0,0,1,sheet2!$B$7)"
Don't use the local´function names. Though there's a referstoR1C1local
property don't use it. It is (at least in my experience) VERY buggy. Also you
may always use the international function names as otherwise your code
wouldn't run in a non-Norwegian version
"hke" wrote:
Hi,
I hope someone can help me out here. I`m having trouble using a defined
dynamic range that I added as a name like this:
ActiveWorkbook.Names.Add Name:="myX", RefersToR1C1:= _
"=""FORSKYVNING(sheet1!$G$10;0;0;1;sheet2!$B$7 )"""
The word FORSKYVNING is just the norwegian translation of OFFSET I
think so don`t mind about that.
To use the named range for the xvalues in my chart I tried the
following:
Set srs = Currentchart.SeriesCollection.NewSeries
srs.XValues = ActiveWorkbook.Names.myX
, but I get that "object doesn`t support property or merthod". Does
anyone know the rigth way to assign myX to srs.XValues?
--
hke
------------------------------------------------------------------------
hke's Profile: http://www.excelforum.com/member.php...fo&userid=1550
View this thread: http://www.excelforum.com/showthread...hreadid=274118