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
HOW TO SOLVE ORDINARY DIFFERENTIAL EQUETION IN VISUAL BASIC PROGRAMMING

For this assignment you have to design and implement a VB.NET project which prepares a bill of payment due, given the purchase amount. The project models a typical purchase transac

ILLUSTRATION OF MDI APPLICATION USING A PROJECT 1. Choose the MDI option while generating the project by using the Appwizard. 2. Add the WM_LBUTTONDOWN message for the view

Message Handling: 1. The message is send to the window. And it is sent to the Window Procedure. 2. The message map holds all the message handlers. 3. The window procedur

The scope of a variable is finding out by where you declare it. While you declare a variable in a procedure, only code in that procedure can access or alter the value of that varia

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

THE PRECOMPILED HEADER FILE As soon as you generate a blank project, ahead of doing any coding you compile the project to generate .pch (that is the pre compiled header) file a

APPWIZARD   The Appwizard is a tool used for creating a project. It follows a series of steps to create a project. Steps Involved in Creating A Project: Step 1: Fr

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

THREE MODELS FOR USER INTERFACE DESIGN   The 3 models for the user interface design are the implementation model, mental model &the manifest model. The Implementation Mod