|
-
May 14th, 2006, 01:01 PM
#1
Thread Starter
Junior Member
array
I have this:
VB Code:
Print #1, lblName(i).Caption; ","; score(i).Caption; ","; kills(i).Caption; ","; death(i).Caption
I need i to any number from 0-15 so instead of me doing
Print #1, lblName(0).Caption; ","; score(0).Caption; ","; kills(0).Caption; ","; death(0).Caption
Print #1, lblName(1).Caption; ","; score(1).Caption; ","; kills(1).Caption; ","; death(1).Caption
and so on i can just use 1 line.
-
May 14th, 2006, 01:05 PM
#2
Re: array
VB Code:
Dim i As Integer
For i = 0 to 15
Print #1, lblName(i).Caption & "," & score(i).Caption & "," & kills(i).Caption & "," & death(i).Caption
Next i
-
May 14th, 2006, 11:12 PM
#3
Thread Starter
Junior Member
Re: array
Thanks, it works. Now how can I make it so instead of seperating with commas (,) it writes on a separate line. Basically equivalent of <br>
-
May 14th, 2006, 11:49 PM
#4
Hyperactive Member
Re: array
use this
For i = 0 to 15
Print #1, lblName(i).Caption & vbCrLf & score(i).Caption & vbCrLf & kills(i).Caption & vbCrLf & death(i).Caption
Next i
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
|