0% found this document useful (0 votes)
87 views

VB Script

VB Script is an Active Scripting language developed by Microsoft that is modeled on Visual Basic. It uses a fast interpreter and can access elements of the environment like the FileSystemObject. VBScript has been installed by default in every desktop release of Microsoft Windows since Windows 98. It uses variants as its only data type and works in an interpreter without needing a compiler. Messages are output using the Msg function. VBScript scripts must be executed within a host environment like Windows Script Host, Internet Explorer, or Internet Information Services.

Uploaded by

Amit Srivastava
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
87 views

VB Script

VB Script is an Active Scripting language developed by Microsoft that is modeled on Visual Basic. It uses a fast interpreter and can access elements of the environment like the FileSystemObject. VBScript has been installed by default in every desktop release of Microsoft Windows since Windows 98. It uses variants as its only data type and works in an interpreter without needing a compiler. Messages are output using the Msg function. VBScript scripts must be executed within a host environment like Windows Script Host, Internet Explorer, or Internet Information Services.

Uploaded by

Amit Srivastava
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
You are on page 1/ 2

VB SCRIPT

Introduction:-

VB Script (Visual Basic Scripting):- is an Active Scripting language developed by Microsoft


that is modelled on Visual Basic. It is designed as a “lightweight” language with a fast interpreter
for use in a wide variety of Microsoft environments. VBScript uses the Component Object
Model to access elements of the environment within which it is running; for example, the
FileSystemObject (FSO) is used to create, read, update and delete files.

VBScript has been installed by default in every desktop release of Microsoft Windows since
Windows 98;

• From now onward use vbs for vb script

• Vbs use only one data type i.e variant. The data type such as
integer,long,single,double,array,object etcare the subtypes of
variant(Master type)

• The vbs is used mainly to activate web pages.

• Vbs works in the interpreter manner so it does not require any


compiler.

• Msg function is used to get output.

NOTE:- A VBScript script must be executed within a host environment, of


which there are several provided with Microsoft Windows, including:
Windows Script Host (WSH), Internet Explorer (IE), and Internet Information
Services (IIS).[3] Additionally, the VBScript hosting environment is
embeddable in other programs, through technologies such as the Microsoft
Script Control (msscript.ocx).

Syntax:-

Msgbox(prompt) --- any predefined function in vbs


isnot case sensitive

Msgbox”welcome to vbs”

How to substitute a variable

Val=”Bangalore”
Msgbox”My native place is “&val

& is used to concatenate with the sentence and also to substitute the
variable

To substitute the variable

val="bangalore"

msgbox val //replacing variable//

Display multiple line in a single message box.

NOTE:-for new line we will use Vbnewline

e.g

msgbox”it is abook”&vbnewline&”

“It is a on atable

You might also like