/ Forside / Teknologi / Udvikling / VB/Basic / Nyhedsindlæg
Login
Glemt dit kodeord?
Brugernavn

Kodeord


Reklame
Top 10 brugere
VB/Basic
#NavnPoint
berpox 2425
pete 1435
CADmageren 1251
gibson 1230
Phylock 887
gandalf 836
AntonV 790
strarup 750
Benjamin... 700
10  tom.kise 610
exit a loop
Fra : ark312


Dato : 31-05-05 09:02

Hello,

What is the best way to exit the following loop?

For i = 0 To File1.ListCount - 1
' break the loop when File1.FileName = "The One I Need"
Select Case File1.FileName
Case "The One I Need"
MsgBox "Found!"
....
Case Else
dummy = ok
End Select
Next

What to do after displaying the Msgbox to break/end the loop?

Thanks,

Sjoerd



 
 
Harald Staff (31-05-2005)
Kommentar
Fra : Harald Staff


Dato : 31-05-05 13:08

Hi Sjoerd

Exit For

HTH. Best wishes Harald

"ark312" <ark312@home.nl> skrev i melding
news:d7h5mm$ep7$1@news1.zwoll1.ov.home.nl...
> Hello,
>
> What is the best way to exit the following loop?
>
> For i = 0 To File1.ListCount - 1
> ' break the loop when File1.FileName = "The One I Need"
> Select Case File1.FileName
> Case "The One I Need"
> MsgBox "Found!"
> ....
> Case Else
> dummy = ok
> End Select
> Next
>
> What to do after displaying the Msgbox to break/end the loop?
>
> Thanks,
>
> Sjoerd
>
>



Søg
Reklame
Statistik
Spørgsmål : 177579
Tips : 31968
Nyheder : 719565
Indlæg : 6409074
Brugere : 218888

Månedens bedste
Årets bedste
Sidste års bedste