Forums before death by AOL, social media and spammers... "We can't have nice things"
|    comp.lang.visual.basic    |    MS Visual Basic discussions, NOT dot-net    |    10,840 messages    |
[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]
|    Message 9,077 of 10,840    |
|    Rick Rothstein to All    |
|    Re: Sub Main not found error.    |
|    13 Dec 04 11:19:45    |
      From: rickNOSPAMnews@NOSPAMcomcast.net              > I wonder what I need to do.       >       > I make a REAL simple design,       >       > One losuy form that has an allocated 'Name' property - Form1       >       > I build solution without an issue.       >       > However, if I change the 'Name' property to say... "Adder" and do the       > same build I will receive an error:       >       > 'Sub Main' not found was not found in 'Adder.Form1'       >       > I can't find any reference to 'Adder.Form1' nor Sub Main.       >       > How would I correct the thing, rather than accept "FORM1" as a       > permanent 'Name' property value. Can I not change any of the Form       > names as I choose?              Of course you can rename a Form any time you want. This is only a guess;       however, it sounds to me like you removed Form1 from the project       somewhere along the line and then added it back in some time later on       (renaming it to Adder at that time). If this is correct, then when you       removed Form1, VB would have automatically made (an assumed to be       defined) Sub Main as the Startup Object (because it needs something to       be defined as the Startup Object). When you added Form1 back into the       project, VB would **not** have reset the Startup Object. I think this       would produce the error you are seeing.              Whether my guess above is correct or not, you should be able to       straighten things out by clicking on Project/Properties in VB's (the       IDE's) menu and selecting your current form's name in the ComboBox       labeled StartUp Object (which should now read Sub Main) on the General       tab.              Rick - MVP              --- SoupGate-Win32 v1.05        * Origin: you cannot sedate... all the things you hate (1:229/2)    |
[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]
(c) 1994, bbs@darkrealms.ca