[RESOLVED] ID elements in an array
Dear All,
Code:
Private Sub Form_Load()
Dim i As Integer
For i = 1 To 30
List1.AddItem (i)
Next
End Sub
Private Sub SetupDatasets()
Dim i As Integer
Dim objDataset As Dataset
Set objDataset = Graph1.Datasets.Add
With objDataset
.Visible = False
.ShowPoints = True
.ShowLines = True
.ShowBars = False
.ShowCaps = False
.LineColor = RGB(0, 0, 255)
.PointColor = RGB(150, 150, 255)
End With
For i = 0 To List1.ListCount - 1
objDataset.Points.Add CInt(List1.List(i))
Next i
end sub
I have Listbox with 30 entries (values).
How do I use only the first 10 entries. Discard the last 20 entries?
Likewise, how do I discard the first 20 entries and use the last 10 entries?
TIA
Re: ID elements in an array
Code:
For i = 0 To 9 '1st 10 entries
objDataset.Points.Add CInt(List1.List(i))
Next i
Code:
For i = 20 To List1.ListCount - 1 'last 10 entries
objDataset.Points.Add CInt(List1.List(i))
Next i
i m not sure that u want like this.
Re: ID elements in an array
Thank you - quite easy!:)