VB Run-Time .EXE Error "Must Have Startup Form or Sub Main()"

ID Number: Q76634

1.00

WINDOWS

buglist1.00

Summary:

The Make EXE File command on the File menu creates an executable file

regardless of whether or not you have chosen a startup form or Sub

Main.

An executable created without a startup form or Sub Main will

generate the error message "Must have Startup form or Sub Main()" at

run time.

Microsoft has confirmed this to be a problem with Microsoft Visual

Basic programming system version 1.0 for Windows. We are researching

this problem and will post new information here as it becomes

available.

To work around the problem, make sure you have chosen a startup form

or have a Sub Main procedure. To choose a startup form, you can use

the Set Startup Form command on the Run menu.

More Information:

Steps to Reproduce Problem

--------------------------

1. Run Visual Basic.

2. From the File menu, choose Remove File.

3. From the File menu, choose Add Form. At this point, there is no

startup form selected.

4. From the File menu, choose Make EXE File. The .EXE file is created,

but it has no startup form or Sub Main. VB.EXE fails to give you an

error message at this point.

5. Exit Visual Basic and run the .EXE file from the Windows Program

Manager.

Running the .EXE file causes the error message "Must have startup form

or Sub Main()."

If you choose the Start command from the Run menu, you will be

prompted for a startup form or Sub Main.

Additional reference words: 1.00