Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

one more question

Posted on 2003-10-22
3
Medium Priority
?
145 Views
Last Modified: 2010-05-03
what's mean by "Sub Main" was not found.
0
Comment
Question by:gegou
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 19

Accepted Solution

by:
Fahad Mukhtar earned 500 total points
ID: 9602053
you are having problems with the start up form
from the projects menu --> Project1 Properties --> Startup object.
select a start up Form from here
and re run the project
0
 
LVL 86

Expert Comment

by:Mike Tomlinson
ID: 9602058
In the VB IDE, open a project file.  On the menu, click on Project, then select the last item in the list to view the project properties.  (It will say Project1 Properties if the project is called Project1).

On the general tab, there is a place to tell the project where to start code execution.  By default, it is Form1, which means code will start at

Private Sub Form_Load()
    MsgBox "Started from Form_Load()"
End Sub

on Form1.  If you change it to Sub Main then you must have a MODULE with a sub called main in it.

Public Sub Main()
    MsgBox "Started from Main()"
End Sub  

Hope this helps.
0
 
LVL 4

Expert Comment

by:brother7
ID: 9602065
It means that when you tried to compile your project, it couldn't find the subroutine Main.  You should have a Main subroutine, as this is the entry point in console applications.  When this error appears in the Task List, click on it.  You will be given a chance to specify the module/Main location.
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

There are many ways to remove duplicate entries in an SQL or Access database. Most make you temporarily insert an ID field, make a temp table and copy data back and forth, and/or are slow. Here is an easy way in VB6 using ADO to remove duplicate row…
Enums (shorthand for ‘enumerations’) are not often used by programmers but they can be quite valuable when they are.  What are they? An Enum is just a type of variable like a string or an Integer, but in this case one that you create that contains…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…
Suggested Courses

636 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question