Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default Programmatically retrieving constants

Hi,

I want to loop through all the series on my chart and change the line
style to possibilities...

the allowed constants a
XlContinuous
XlDash
xlDashDot
xlDot
etc

xlContinuous has a value of 1, xlDash has a value of -4115 etc...

Is there any way of looping through the allowed values, and therefore
assigning the "next" constant to the dataseries being processed???

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,600
Default Programmatically retrieving constants

Sub test()
Dim i As Long
Dim nStyle As Long
Dim cht As Chart
Dim sr As Series
Dim arr

arr = Array(xlContinuous, xlDash, xlDot, xlDashDot, xlDashDotDot, _
xlGray25, xlGray50, xlGray75)

Set cht = ActiveSheet.ChartObjects(1).Chart

nStyle = LBound(arr)
For i = 1 To cht.SeriesCollection.Count
Set sr = cht.SeriesCollection(i)

sr.Border.LineStyle = arr(nStyle)

If nStyle = UBound(arr) Then
nStyle = LBound(arr)
Else: nStyle = nStyle + 1
End If
Next

End Sub


Not sure about those Grays though

Regards,
Peter T

"Matthew Norman" wrote in message
...
Hi,

I want to loop through all the series on my chart and change the line
style to possibilities...

the allowed constants a
XlContinuous
XlDash
xlDashDot
xlDot
etc

xlContinuous has a value of 1, xlDash has a value of -4115 etc...

Is there any way of looping through the allowed values, and therefore
assigning the "next" constant to the dataseries being processed???



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
Retrieving Data: Speed of beating down rows vs retrieving from array? (PeteCresswell) Excel Programming 2 July 9th 07 03:30 PM
Retrieving list of worksheets programmatically Scott Bass Excel Programming 3 July 2nd 05 01:36 PM
constants Confused Excel Discussion (Misc queries) 3 December 2nd 04 05:05 PM
constants alekm Excel Programming 1 September 9th 04 12:16 PM


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