View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
K Dales[_2_] K Dales[_2_] is offline
external usenet poster
 
Posts: 1,163
Default new excel vba functionality

If by referencing the points, it appears you mean the values of the points;
this is possible:

Dim MyPoints as Variant
Set MySeries = MyChart.SeriesCollection(1)
Set MyPoints = MySeries.Values
' MyPoints is now an array containing the values for all the points in
MySeries
For i = 1 to UBound(MyPoints)
MsgBox MyPoints(i)
Next i

Many other properties of the points are available through MySeries.Points,
of course.
--
- K Dales


"medicenpringles" wrote:


this will probably never get considered or even read, but i'll try
anyway. I've been developing solutions in Excel for a long time and i
love everything about it. but one of the things i've run into several
times is the issue of conditional chart formatting. there are a
million ways to do this, but i think maybe if some MVP out there could
drop Microsoft a line with my suggestion, it would help at least me out
tremenously.

my suggestion is simply this: i think there should be a way to
programmatically reference specific series points on the chart. that
way you could write VBA code like:

If myChart.SeriesPoint(1) myChart.SeriesPoint(2) Then
myChart.Trendlines(1).Color = Red
End If

this may be possible with Visual Studio Tools for Office, but i've
never gotten to touch that yet.

any advice welcome.


--
medicenpringles


------------------------------------------------------------------------
medicenpringles's Profile: http://www.excelforum.com/member.php...o&userid=16458
View this thread: http://www.excelforum.com/showthread...hreadid=488827