# help with looping

Page 1 of 1

## 4 Replies - 627 Views - Last Post: 29 July 2009 - 07:36 AMRate Topic: //<![CDATA[ rating = new ipb.rating( 'topic_rate_', { url: 'http://www.dreamincode.net/forums/index.php?app=forums&module=ajax&section=topics&do=rateTopic&t=116435&amp;s=f9eba8bfa40937b69da1df8439080936&md5check=' + ipb.vars['secure_hash'], cur_rating: 0, rated: 0, allow_rate: 0, multi_rate: 1, show_rate_text: true } ); //]]>

### #1 Navymike

Reputation: 0
• Posts: 1
• Joined: 23-July 09

# help with looping

Posted 23 July 2009 - 10:50 AM

Need some help to try to understand looping.

Any help would be appricated.

mike
Is This A Good Question/Topic? 0

## Replies To: help with looping

### #2 raziel_

• Like a lollipop

Reputation: 466
• Posts: 4,262
• Joined: 25-March 09

## Re: help with looping

Posted 23 July 2009 - 11:08 AM

ok see

```for i=0 to listbox1.listcount-1
strTest= listbox1.list(i) 'edit: rewrite in string strTest evry item in listbox
if strTest2=listbox1.list(i) then
msgbox listbox1.list(i), vbOkOnly ' search for string in strTest2 in listbox list if find then a mesage come with result
end if
next i

```

simple example a mesage box will pop up when i gets bigger
```Private Sub Command1_Click()
Dim i As Integer
For i = 1 To 10
MsgBox i, vbOKOnly
Next i
End Sub

```

do while

```
dim i as integer

do

msgbox i, vbOkOnly
i=i+1
while i<11

```

will return 1,2,3,4,5,6,7,8,9,10

```
dim i as integer

do
i=i+1
msgbox i, vbOkOnly

while i<11

```

returns 2,3,4,5,6,7,8,9,10,11

``` While i < 11
i = i + 1
MsgBox i, vbOKOnly

Wend

```

returns 2,3,4,5,6,7,8,9,10,11

``` While i < 11

MsgBox i, vbOKOnly
i = i + 1
Wend

```

returns 1,2,3,4,5,6,7,8,9,10

paste this code in some button click and try how they work you can debug them to see what happening
good luck

This post has been edited by NoBrain: 23 July 2009 - 11:22 AM

### #3 raziel_

• Like a lollipop

Reputation: 466
• Posts: 4,262
• Joined: 25-March 09

## Re: help with looping

Posted 23 July 2009 - 11:23 AM

lol i edit it

### #4 DCunningham

Reputation: 1
• Posts: 41
• Joined: 19-May 09

## Re: help with looping

Posted 29 July 2009 - 07:35 AM

LOL NoBrain!

### #5 raziel_

• Like a lollipop

Reputation: 466
• Posts: 4,262
• Joined: 25-March 09

## Re: help with looping

Posted 29 July 2009 - 07:36 AM

i was in a phase to do this

Page 1 of 1

 .related ul { list-style-type: circle; font-size: 12px; font-weight: bold; } .related li { margin-bottom: 5px; background-position: left 7px !important; margin-left: -35px; } .related h2 { font-size: 18px; font-weight: bold; } .related a { color: blue; }