Module - dialog box in visual basic, Visual Basic Programming

MODULE

The Modules are the collection of VB statements. Modules are used to simplify the program development. To add a module to your project, choose the project tabpage, and then right click and select add, then select the module. In answer a new dialog will open up.Select new and a new window will open to type your coding. Type the coding which is as shown below:

Sub Main()

Dim sum1 As Integer

sum1 = 80

sum1 = sum1 + 10

MsgBox sum1

Main1

End Sub

Add one more module as Main1. Now type the coding in module Main1which is as shown below:

Sub Main1()

Dim sum1 As Integer

sum1 = 80

sum1 = sum1 - 10

MsgBox sum1

End Sub

You can select the Startup object for the project. Now Select the project tabpage, then right click and choose the properties. Then choose the startup object from the Startup object list box control. In this situation select Main(). Whenever you execute, the Main() will be the initial point of the execution. It displays sum1, and then a call to function Main1 is encountered. Therefore the control gets transferred to the module containing Main1. In the Main1 the subtraction is completed and the value is exhibited.

Posted Date: 10/9/2012 9:21:03 AM | Location : United States







Related Discussions:- Module - dialog box in visual basic, Assignment Help, Ask Question on Module - dialog box in visual basic, Get Answer, Expert's Help, Module - dialog box in visual basic Discussions

Write discussion on Module - dialog box in visual basic
Your posts are moderated
Related Questions
Select Case: The Select Case is used for handling the multiple paths. The Select Case computes the expression and depending on the value of the equivalent Case statement execu

Adding Handlers With Class Wizard: Whenever a handler is added, the class wizard places the prototype for the message handler in the header (.H) file. It gives a skeleton hand

MULTIPLE DOCUMENT INTERFACE (MDI) WINDOWS   The SDI (Single document interface) supports one open window or document at a particular time. Microsoft's notepad and paint are il


Record Set: The record set presents the records in a base table or the records retrieved due to the query. The record set falls into 3 classes. These are table type record set

A triangle is equilateral if all three sides are equal, isosceles if any two (but no more than two) sides are equal, and scalene if no two sides are equal. A triangle will be input

Depreciation to a Salvage Value of 0.   For tax purposes an item may be depreciated over a period of several years, n. With the straight-line method of depreciation, each year th


Message Routing: The system posts the messages to a first-in, first-out queue known as the message queue or it sends the messages directly to a window procedure. The Messages

Would it be possible to see an example of an array program that tracks rent in different apartment buildings and is modular?