0% found this document useful (0 votes)
65 views2 pages

VB Script

This document provides information about using message boxes in Visual Basic, including the syntax for creating a message box, descriptions of the different button options and types, and constants for the button and icon values. It also gives a brief overview of the If/Else syntax in Visual Basic for conditional statements.

Uploaded by

purushotham
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
65 views2 pages

VB Script

This document provides information about using message boxes in Visual Basic, including the syntax for creating a message box, descriptions of the different button options and types, and constants for the button and icon values. It also gives a brief overview of the If/Else syntax in Visual Basic for conditional statements.

Uploaded by

purushotham
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

Message Box:

syntax- msgbox("Message box", type, "title")

Button Warning
OK 1
Cancel 2
Abort 3
Retry 4
Ignore 5
Yes 6
No 7

Msgbox button constant


VBOkOnly 0 Show OK only
VBOKCancel 1 OK, Cancel
VBAbortRetryIgnore 2 Show Abort retry and
ignore
VBYesNoCancel 3
VBYesNO 4
VBRetryCancel 5
VBCritical 16 critical
17
18
19
20
21

VBQuestion 32 Question
33
34
35
36
37

VBExclamation 48 Warning
49
50
51
52
53

VBInformation 64 Show information


message box
VBDefaultButton1 0 First Button is default
VBDefaultButton2 256 Second Button is default
VBDefaultButton3 512 Third Button is default
VBDefaultButton4 768 Fourth Button is default
VBApplicationModel 0 Demands that the user
respond to the dialog before
allowing continuation of work
in current application

VBSystemModel 4096 Causes suspention of all


applications untill the user
responds to the diloge

If else
Synax - If Condition Then
Code:
ElseIf Condition Then
Code
End If

You might also like