473,396 Members | 2,087 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Module Name Change 101

Hi, This is something really simple.

A Console Application example in a course book, where the module file name
was renamed to Welcome1, works fine when I use the original name "module1"
for the module.
In the book they advise to change this module name to "modFirstWelcome"
simply by replacing the identifier "module1" to "modFirstWelcome". Nothing
else seems to be needed. Fine, but if I do so and go to Build>Build Solution,
an error comes up stating: : “ ‘Sub Main’ was not found in Welcome1.module1 “
The section "SumMain ... to .. End Sub is still there. So it looks like the
new name is not recognized. What is wrong and how do I do this correctly?

So the following works fine:

Module module1

Sub Main()
Console.WriteLine("Welcome to Visual Basic!")
End Sub

End Module

While this does not:

Module modFirstWelcome

Sub Main()
Console.WriteLine("Welcome to Visual Basic!")
End Sub

End Module

Thanks for your advice,
--
John
Nov 21 '05 #1
1 1427
"John Pass" <Jo******@discussions.microsoft.com> wrote in message
news:Jo******@discussions.microsoft.com:
In the book they advise to change this module name to "modFirstWelcome"
simply by replacing the identifier "module1" to "modFirstWelcome". Nothing
else seems to be needed. Fine, but if I do so and go to Build>Build Solution,
an error comes up stating: : " 'Sub Main' was not found in Welcome1.module1 "
The section "SumMain ... to .. End Sub is still there. So it looks like the
new name is not recognized. What is wrong and how do I do this correctly?


You may need to change Project -> Properties, then in the Common
Properties section highlight General and check your Startup Object.
Could that be it?

--

-shane

Nov 21 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: rh0dium | last post by:
Hi all, So I have a slice of code which calls other python code. I have started to take a real liking to the logging module, but I want to extend this into the called python code. I have no...
2
by: Lumpierbritches | last post by:
I have code I'm using repeatedly in my program, and would like to convert it to a module or macro, can anyone assist me? Thank you in adavance for all assistance, it is greatly appreciated. Dim...
4
by: excelleinc.com | last post by:
Hello, I'm trying to put sub that's shared between all forms in my app in module so when I make change I just change it one time. This sub should execute and then invoke sub defaults() that's...
9
by: Rudy | last post by:
Hello All! I'm a little confused on Public Class or Modules. Say I have a this on form "A" Public Sub Subtract() Dim Invoice As Decimal Dim Wage As Decimal Static PO As Decimal Invoice =...
32
by: Matias Jansson | last post by:
I come from a background of Java and C# where it is common practise to have one class per file in the file/project structure. As I have understood it, it is more common practice to have many...
6
by: James T. Dennis | last post by:
Tonight I discovered something odd in the __doc__ for tempfile as shipped with Python 2.4.4 and 2.5: it says: This module also provides some data items to the user: TMP_MAX - maximum number...
6
by: ai | last post by:
It assumes that there is a module A which have two global variables X and Y. If I run "import A" in the IDLE shell, then I can use A.X and A.Y correctly. But if I want to change the module A and...
21
KevinADC
by: KevinADC | last post by:
Note: You may skip to the end of the article if all you want is the perl code. Introduction Uploading files from a local computer to a remote web server has many useful purposes, the most...
6
by: Steven D'Aprano | last post by:
I have a function that needs a reference to the module object it is defined in. (For the reason why, if you care, see the thread "doctest not seeing any of my doc tests" from a week ago.) I know of...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.