Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default referencing a dynamic array


Hi all!

I`m having trouble with referring to a dynamic seriesin my vba macro. I
created theseries inside the macro like this

With Currentchart.SeriesCollection.NewSeries
XValues = "=sheet1!myX"

Which works fine.

the problem is that later I need to assign to refer to the elements in
the series. How can I access them?

I tried to declare a dynamic array and set it equal to the series,
Public myX() As Integer
myX() = "=sheet1!myX"

but then get the message
"can`t assign to array"




--
hke
------------------------------------------------------------------------
hke's Profile: http://www.excelforum.com/member.php...fo&userid=1550
View this thread: http://www.excelforum.com/showthread...hreadid=273611

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 14
Default referencing a dynamic array

Hi,

I'm not entirely sure what you're trying to do here. Do you want to refer to
the new series you have created or to the actual dynamic range itself?

If I follow you, it's the former in which case you can refer to them in the
following way:

CurrentChart.SeriesCollection(x).points(y).

Where x is the index of NewSeries you created earlier.

Post back if I've got the wrong end of the stick.

Cheers, Pete


"hke" wrote:


Hi all!

I`m having trouble with referring to a dynamic seriesin my vba macro. I
created theseries inside the macro like this

With Currentchart.SeriesCollection.NewSeries
.XValues = "=sheet1!myX"

Which works fine.

the problem is that later I need to assign to refer to the elements in
the series. How can I access them?

I tried to declare a dynamic array and set it equal to the series,
Public myX() As Integer
myX() = "=sheet1!myX"

but then get the message
"can`t assign to array"




--
hke
------------------------------------------------------------------------
hke's Profile: http://www.excelforum.com/member.php...fo&userid=1550
View this thread: http://www.excelforum.com/showthread...hreadid=273611


Reply
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
Error referencing linked dynamic range Basil Links and Linking in Excel 3 January 9th 10 01:48 PM
Dynamic referencing to files Sungibungi Excel Discussion (Misc queries) 4 November 26th 09 02:19 AM
Referencing an array formula Sh Excel Discussion (Misc queries) 2 May 26th 09 11:34 PM
Referencing an array name Henrik Excel Discussion (Misc queries) 2 December 2nd 06 09:27 PM
Dynamic file referencing? [email protected] Excel Worksheet Functions 1 October 9th 06 09:08 PM


All times are GMT +1. The time now is 05:14 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"