# "sub main" not found



## dragonempres (Jun 23, 2003)

Everything was working fine and then this error suddenly showed up when i tried to debug. Does anyone know how i can fix it? Thanks!


'Sub Main' was not found in 'NotePad_Project.Form1'.


----------



## jmcrisp (Jun 11, 2004)

I just got that same error when working with VB.NET. What I figured out was when I renamed my form (from the default Form1) it lost the association with which form to display during runtime. (i.e it was still trying to run Form1 which no longer existed). I fixed it by going to the project properties (In .NET it's Project --> 'NAME' Properties) and under the general properties, I had to set the "Startup Object" to be the form that I had renamed.

Hope this helps,

Jennifer


----------



## AbvAvgUser (Oct 3, 2002)

I assume it is VB 6.

Open your project. Click on Project > Properties. Go to General Tab and you will see *Startup Object*.

It must be showing sub main there. Change it to whatever you like from the drop down list.


----------

