Buck Beasom
asked on
Sub Main Error
I've been working on an application for a while. It's main form is called "frmPacingManagement" and I have that form set up to load in the "Startup Object" drop down on the Application Tab.
When I try to run the application, I get an error: "Error 1 'Sub Main' was not found in 'TBOPacing.frmPacingManage ment'." I don't have an object called Sub Main, but when I go to the Startup Object drop down box, Sub Main appears there at the top of the list.
Is "Sub Main" some kind of hidden routine that is supposed to be in my code?
Thanks.
When I try to run the application, I get an error: "Error 1 'Sub Main' was not found in 'TBOPacing.frmPacingManage
Is "Sub Main" some kind of hidden routine that is supposed to be in my code?
Thanks.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
I think I know what is busted. I just need some advice on how to fix it.
When I go to work on my form "frmPacingManagement" I can no longer get to the designer - I can just see the code. But when I look in the Class Diagram, there is now a class there called "pnlSalesTeamTitle" - and when I open it, it has all of the design code in there. So somehow I renamed something or otherwise trashed its attributes so that my frmPacingManagement is broken into 2 pieces - the event codes and the design code.
What do I have to do with the "pnlSalesTeamTitle" to get my form back together? The top rows of code are this:
<Global.Microsoft.VisualBa sic.Compil erServices .DesignerG enerated() > _
Partial Class pnlSalesTeamTitle
Inherits System.Windows.Forms.Form
If I change "Partial Class pnlSalesTeamTitle" back to "Partial Class frmPacingManagement" will I get things back together?
Thanks.
When I go to work on my form "frmPacingManagement" I can no longer get to the designer - I can just see the code. But when I look in the Class Diagram, there is now a class there called "pnlSalesTeamTitle" - and when I open it, it has all of the design code in there. So somehow I renamed something or otherwise trashed its attributes so that my frmPacingManagement is broken into 2 pieces - the event codes and the design code.
What do I have to do with the "pnlSalesTeamTitle" to get my form back together? The top rows of code are this:
<Global.Microsoft.VisualBa
Partial Class pnlSalesTeamTitle
Inherits System.Windows.Forms.Form
If I change "Partial Class pnlSalesTeamTitle" back to "Partial Class frmPacingManagement" will I get things back together?
Thanks.
Ok, make a backup of your project just in case. Close Visual Studio and open a windows explorer in your application folder.
You should have 3 files for your form:
frmPacingManagement.vb THAT HAVE YOUR CODE
frmPacingManagement.Design er.vb THAT HAVE YOUR CONTROLS DEFINITIONS
frmPacingManagement.resx THAT HAVE AND BINARY DATA SUCH YOUR IMAGES
Open the file frmPacingManagement.Design er.vb and post its content, also do the same for the frmPacingManagement.vb, so we can try to figure it out what happend.
You should have 3 files for your form:
frmPacingManagement.vb THAT HAVE YOUR CODE
frmPacingManagement.Design
frmPacingManagement.resx THAT HAVE AND BINARY DATA SUCH YOUR IMAGES
Open the file frmPacingManagement.Design
Well, backup you application, and do that change, it will try to join both classes since they are PARTIAL CLASS
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Well, thank heavens it turned out to be that simple. Since both of you helped (and Zhaolai not for the first time!) I am splitting the points.
Many thanks!
Many thanks!
ASKER
I am new at this, and one of the problems I have been having is that I sometimes find myself changing properties for an incorrectly selected object. It happens alot with panels. So I'm thinking that I did something bizarre with the pnlSaleTeamTitle and cause it to stomp all over my code.
Any suggestions will be appreciated.
VB-ClassError.bmp