468,306 Members | 1,200 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,306 developers. It's quick & easy.

Multiple Sub Main?

Originally posted this in the upgrade forum without an answer:

I had an old VB program that I pulled into VS2005 to see if I could
get anything useful out of the upgrade wizard. Well the program did not have
a Sub Main, so I added that to a module and tried to set that as the startup
object. But now I have this error:

Error 1 'Sub Main' is declared more than once in 'MyUpgradedProject':
MyUpgradedProject.My.MyApplication.Main(Args() As String),
MyUpgradedProject.modFunctions.Main()
Did a search through both the project and the files and cannot find
My.MyApplication.Main. I'm guessing this is some reference that the upgrade
"wizard" created in a buried file. Any ideas?
Aug 31 '06 #1
1 3545
Earl,

By default has a form project a hidden Sub main class.

Although that should not be used if you are using your own Sub main.

Have you looked in the properties of the application what is the Start up.
If it is a Form than you do not need in fact the Sub main.
However some as by instance Herfried like to start a program with Sub Main.
(By instance for setting the visual styles)

Cor

"Earl" <br******@newsgroups.nospamschreef in bericht
news:%2****************@TK2MSFTNGP02.phx.gbl...
Originally posted this in the upgrade forum without an answer:

I had an old VB program that I pulled into VS2005 to see if I could
get anything useful out of the upgrade wizard. Well the program did not
have
a Sub Main, so I added that to a module and tried to set that as the
startup
object. But now I have this error:

Error 1 'Sub Main' is declared more than once in 'MyUpgradedProject':
MyUpgradedProject.My.MyApplication.Main(Args() As String),
MyUpgradedProject.modFunctions.Main()
Did a search through both the project and the files and cannot find
My.MyApplication.Main. I'm guessing this is some reference that the
upgrade
"wizard" created in a buried file. Any ideas?


Aug 31 '06 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

5 posts views Thread by Victor | last post: by
9 posts views Thread by pranav.choudhary | last post: by
7 posts views Thread by =?Utf-8?B?TG9zdEluTUQ=?= | last post: by
2 posts views Thread by Immortal Nephi | last post: by
reply views Thread by Teichintx | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.