-
Jun 27th, 2009, 01:35 AM
#1
Thread Starter
Hyperactive Member
[RESOLVED] loop from upper bound to lower bound
hi all,
i remember when i first started to learn vb i came across a task that had to loop from upper bound to lower bound.. but now, i fail to recall it..i did google and search but i can't get what i am looking for.. heres a simple example
vb Code:
dim i as integer
dim spl() as string
dim strA as string
stra="a/b/c/e/f"
spl=split(stra,"/")
for i = ubound(spl) to lbound(spl)
debug.print spl(i)(
next i
..i want to loop form the upper bound to lower bound..obtaining the result f,e,c,b,a ..
..i can use other ways to get it.. but my question is .. 'is there any syntax that allows to loop from ubound to lbound' ,if yes please provide the correct syntax.?
-
Jun 27th, 2009, 01:54 AM
#2
Re: loop from upper bound to lower bound
Code:
For i = UBound(spl) To LBound(spl) Step -1
Debug.Print spl(i)
Next i
-
Jun 27th, 2009, 01:59 AM
#3
Thread Starter
Hyperactive Member
Re: loop from upper bound to lower bound
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|