If Boolean = True Then (Help!)

Danny Relic
07-09-2007, 10:02 AM
I get a Block if without End If error with the following code:

If NextTorrent = True Then
End Sub
End If

How can I set up an if statement to where if the boolean value is true, the sub is closed??

07-09-2007, 10:14 AM
You probably mean "Exit Sub" instead of "End Sub". "End Sub" declares the end of a sub and thus cannot be used inside any conditional code.
"Exit Sub" on the other hand simply means, exit this sub, or you could see it as "go to End Sub".

Danny Relic
07-09-2007, 10:20 AM
Thank you!

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum