Compilation problem in Visual Basic

I cant seem to find out what happened to my program. I keep getting this error when I compile my project:
"Invalid outside procedure"
"Only comments may appear after End Sub, End Function, or End Property"
When I tried to compile it using a separate compiler it worked. But when I compiled it with the compiler of VB Visual Studio 9 it gives me the error.
