473,499 Members | 1,909 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

'Sub Main' was not found ....

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'

Where should I put Sub main and what should it contain

Thank you in advance
Pavel
Nov 20 '05 #1
3 14735
* "=?Utf-8?B?UGF2ZWw=?=" <pa********@hotmail.com> scripsit:
I'm new with vb.net.
I've got application of single form 2 buttons and text field.
When I try to run my program
I get the following message
'Sub Main' was not found in 'LoanCalculator.Form1'.

Where should I put Sub main and what should it contain.


Should work. Is it a 'Public Shared Sub Main'? You can select the
startup object in the project properties.

--
Herfried K. Wagner [MVP]
<http://dotnet.mvps.org/>
Website Address Changed!
Nov 20 '05 #2
Pavel,
In addition to Herfried's comments:

What is the name of your form? It sounds like you renamed your form from
Form1 to LoanForm, CalculatorForm, frmLoan, or something else...

Use the Projects - Property Pages to select your Startup object, your only
form.

To get to the Projects - Property Pages, right click on the Project in
Solution Explorer and select Properties.

Hope this helps
Jay
"Pavel" <pa********@hotmail.com> wrote in message
news:87**********************************@microsof t.com...
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 program
I get the following message
'Sub Main' was not found in 'LoanCalculator.Form1'.

Where should I put Sub main and what should it contain.

Thank you in advance,
Pavel

Nov 20 '05 #3
LoanCalculator? Pavel? ...Hartford based company employee?

If so, it's me, Scott M!

You probably changed the default form (form1) name to something more
appropriate. But when you did that, VS.NET still wanted to use Form1 as the
project's startup object and couldn't find it. It then went looking for the
next best thing, a Sub called "Main" (which is a kind of default sub), which
you don't have either and thus you get the error.

When VS.NET indicates that "There were build errors. Do you want to
continue?", choose "No" and then you will have a Task window appear. Double
click on the task about the error and a small dialog will come up asking you
what the project should start with. Your correctly named form will be
listed, just choose it and you are all set.

You can also, right click on the project name in the Solution Explorer and
choose properties. You can set the project's start up object there as well.
"Pavel" <pa********@hotmail.com> wrote in message
news:87**********************************@microsof t.com...
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 program
I get the following message
'Sub Main' was not found in 'LoanCalculator.Form1'.

Where should I put Sub main and what should it contain.

Thank you in advance,
Pavel

Nov 20 '05 #4

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

Similar topics

3
10474
by: Paul Bruneau | last post by:
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.
16
12638
by: deko | last post by:
I have a sub routine that searches the Outlook PST for a message sent to/from a particular email address. Obviously, this can take a long time when the PST contains thousands of messages. I'd...
3
1461
by: Bill | last post by:
I have 2 applications in my web site. The root application and a sub application. I want them to share certain items like my header and footer user controls. How do I do this? When ever I try...
8
3569
by: Rody Reulen | last post by:
I made an console application with Visual Basic .net. Visual Basic will automatically create the sub procedure main for you. I try to convert the main procedure to a function. During the...
8
2394
by: kyle | last post by:
Hi ther I have a small vb.net 2003 program with 5 forms: form1, form2, et I have a module in the program from where I want to launch form1 - the main for In the module I have a bunch of public...
12
2698
by: Brian Shafer | last post by:
Hi, In VB Classic I used a sub main() in all my programs. How do I do that in VB.net without setting the application type to Console application? Looks like when I set it to console it disable...
2
1523
by: Bill nguyen | last post by:
I converted a VB.NET 2003 app to 2005. I got error "SUB MAIN" not found. Why 05 requires a Sub Main to run? I never used Sub Main in my apps. Thanks Bill
3
1688
by: Bobby | last post by:
Hi, I have an application which uses Access 2003 as both the FE and the BE. However, for a number of good reasons, I am in the process of converting the BE to SQL server 2003. I am not converting...
2
7643
by: =?Utf-8?B?QS4gUm9iaW5zb24=?= | last post by:
Okay...this is my last post for the week!! I've been follwoing the examples in BOL/MSDN and yet I'm encountering issues constantly. This one is actually occuring when I'm in VS and trying to create...
0
7174
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,...
0
7220
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
6894
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
7388
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5470
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
4919
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
3099
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3091
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1427
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...

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.