473,394 Members | 1,696 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

Sub Main not found error.

Hi Folks,

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?

Thanks -- paul

Jul 17 '05 #1
3 10471
> 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

Jul 17 '05 #2
On Mon, 13 Dec 2004 10:34:40 -0500, Paul Bruneau <bruneaup@SPAM
rogers.com> wrote:
Hi Folks,

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 think this might be FRED.NET
Jul 17 '05 #3

"Paul Bruneau" <bruneaup@SPAM rogers.com> wrote in message
news:43********************************@4ax.com...
Hi Folks,

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?

Thanks -- paul


When you first create a project, VB thinks Form1 is the startup object
when you change the name of Form1, you need to right-click the project in
the solution explorer, click 'properties' and set the startup object to the
new name of your form

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.807 / Virus Database: 549 - Release Date: 12/8/2004
Jul 17 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Marco Vezzoli | last post by:
Hi all, I'm using solaris 8 gcc 3.0.1 postgres 7.3.4 psycopg 1.1.2 apache 1.3.19 python 2.1.1 mod_python 2.7.8 compiled with DSO
2
by: Legendary Pansy | last post by:
Hello, I'm trying to accomplish the impossible by trying to do something equivalent of this example found here http://www.c-sharpcorner.com/Code/2003/Dec/DialogTutorial.as Starting with "Listing...
10
by: PufferFish | last post by:
Hi folks, I hope that this is the correct group for these things, apologies if not. I've got a strange compiler error. It appears to be similar to the issue described in knowledgebase...
3
by: Pavel | last post by:
Hi I'm new with vb.net I've got application of single form 2 buttons and text field When I try to run my progra I get the following messag 'Sub Main' was not found in 'LoanCalculator.Form1' ...
9
by: Paulers | last post by:
Hello vb.net experts :) I am trying to program an app that resides in the system tray and I am trying to put all my main code in sub Main(). I am getting this errormessage at compile: ...
1
by: kumarangopi | last post by:
Iam working with graphics.I wrote a pgogram in turbo c for graphics.I need to run on Freebsd system, so installed SDL and trying.when i give make in sdl_image folder /usr/lib/crt1.o undefined...
6
by: unlikeablePorpoise | last post by:
I am trying to get JPype to pass a String into a Java class main function. Demonstration code below: =============JAVA============ package com; public class JPypeTest { public static void...
3
by: cargilcm | last post by:
Hello all, You may wish to skip to the "-------" part I apologize for being so new to this community as to not have updated my user profile. I intend on posting IT jobs soon, becoming a regular...
80
by: Ioannis Vranos | last post by:
Hi, in C90 is "int main()" valid, the same as "int main(void)" and "int main(int argc, char *argv)"? AFAIK in C99 only "int main(void)" and "int main(int argc, char *argv) - and the **argv...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.