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
Illustration of GDI object CPen: 1. Generate a SDI application. And name it as gdipen. 2. Press ctrl (control key) and W altogether to invoke the class wizard. 3. Choose

ARCHITECTURE OF WIN 32 PROGRAM   Figure: working of Win 3 program The hardware events in the figure are the mouse associated events like the mouse move, left

RESOURCES The cursors, Icons, dialog, bitmaps accelerators, menu, table tool bar and string are the different resources. The resources are compiled by the resource compiler. Th

Software That Is Obscure: The Software hides the intensions, meaning and actions from the user. For illustration, if a user is asked whether a full installation, the custom in

You can employ For...Next statements to run a block of statements a specific number of times. For loops, employ a counter variable whose value is increased or decreased with each r

Methods: VBScript Err Object Clear Method Clears every property settings. Raise Method Generate a run-time error.

write a XML with database with book details( book id, author ,subject, published year, vendor,price, language )

i need code for assignment problem of operational research in vb

A Sub procedure is a series of VBScript statements, enclosed through Sub & End Sub statements which perform actions however don't return a value. A Sub procedure can take arguments

MESSAGES The Windows-based applications do not make explicit function calls to acquire input. They wait for the system to pass the input to them. The system passes input to the