Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

My First program in VB.net

Status
Not open for further replies.

henpat123

Programmer
Apr 14, 2005
35
0
0
US
HI,
I started my first VB.net program, by starting a Console Application.By Default it created a Module1.vb file and in the content editor there was a Module declared as follows:
Module Module1
Sub Main()
End Sub
End Module

I changed the name of the Module in the content Editor from Module1 to MyTestModule and I get this Error saying
"Startup code 'Sub Main' was specified in 'ConsoleApplication2.Module1', but 'ConsoleApplication2.Module1' was not found."

But the text book says I can change the Module name to anything one wants. What is going wrong?

henry
 
Select the Project menu item, then Properties, then under the Startup object: select an item from the drown down list.
 
Hey Henpat,

When you rename your module, you need to go into you project properties and change your startup object to reflect the name of your new module.

To do this, right click your project in your solution explorer and click properties. Change the startup object to the name of the module which contains Sub Main.

------------------------------------------
Steen Bray
Kermode Computing Solutions
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top