Solved

one more question

Posted on 2003-10-22
3
136 Views
Last Modified: 2010-05-03
what's mean by "Sub Main" was not found.
0
Comment
Question by:gegou
3 Comments
 
LVL 19

Accepted Solution

by:
Desp earned 125 total points
Comment Utility
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 85

Expert Comment

by:Mike Tomlinson
Comment Utility
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
Comment Utility
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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
DIR issue 7 46
Excel VBA combine two working workbooks 8 38
Visual Basic Excel Formatting error 4 66
Spell Check in VB6 13 42
Article by: Martin
Here are a few simple, working, games that you can use as-is or as the basis for your own games. Tic-Tac-Toe This is one of the simplest of all games.   The game allows for a choice of who goes first and keeps track of the number of wins for…
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 process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

744 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

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now