Computer Science Canada

End If error

Author:  Pat [ Tue Jun 06, 2006 10:04 am ]
Post subject:  End If error

I'm making a tetris program in VB. I keep getting an error: Compile error: "End If without block If"

I don't know what this means. It highlights "End If" when the error comes up. I made sure all the If's have End If's and I don't think it's an extra "End If". Please help! It would be greatly appreciated! Very Happy

Author:  GlobeTrotter [ Tue Jun 06, 2006 2:03 pm ]
Post subject: 

Post your code. You probably do have an extra end if but don't notice it.

Author:  cool dude [ Tue Jun 06, 2006 3:27 pm ]
Post subject: 

as globetrotter said u do have an extra end if and i'm willing to bet on that! this error only comes up if u accidently sticked an extra end if somewhere. try deleting the end if that gets highlighted does it work when u delete it?

Author:  Pat [ Mon Jun 12, 2006 3:28 pm ]
Post subject: 

I just wanted to say I did fix the error. I had a "hidden" extra End If. Thanks for all your help!

Author:  HazySmoke)345 [ Mon Jul 03, 2006 8:58 pm ]
Post subject: 

Sometimes you can have a For loop without Next and it says that, too. Strange language, isn't it?

Don't just check the ifs and end-ifs. Check all the other statements, too.


: