Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Retrieve value of array 2

Status
Not open for further replies.

MikeCDPQ

Technical User
Sep 11, 2003
173
0
0
CA
I have a slight problem where I want to find out the value of array (110, 120, 130, 310 etc.) and all I seem to be able to get is the sequential

I tried declaring byval and that doesn't seem to work.

Once again, must be so simple ...

Thanks to anyone for any suggestions.

Mike


XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

DCLINKS = Array(110, 120, 130, 310, 340, 350, 360, 380, 410, 430, 520, 530, 540, 610, 620, 630)


For DCLINKS = 1 To 16
DClink = DCLINKS
(routine) .......
Next DCLINKS
 


Hi,
Code:
    Dim DCLINKS, i
    DCLINKS = Array(110, 120, 130, 310, 340, 350, 360, 380, 410, 430, 520, 530, 540, 610, 620, 630)
    For i = 0 To UBound(DCLINKS)
        MsgBox DCLINKS(i)
    Next

Skip,
[sub]
[glasses] [red][/red]
[tongue][/sub]
 
I'm not sure I understand your question. Are you looking for something like this?

Code:
for index = 1 to 16
     DClink = DCLINKS(index)
     (do this stuff....)
next index
 
Dim DCLINKS()
Dim DClink
Dim i As Integer
DCLINKS = Array(110, 120, 130, 310, 340, 350, 360, 380, 410, 430, 520, 530, 540, 610, 620, 630)

For i = 0 To UBound(DCLINKS)
DClink = DCLINKS(i)
MsgBox DClink
Next

Swi
 
Thank Skip and Swi.

That's exactly what I needed. Worked like a charm.

Thanks a bunch !

Mike
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top