×

Top 30 VB Script Interview Questions for 2024

1) What is VB Script?

VBScript stands for Visual Basic Scripting Language. It is a light version of Microsoft Visual Basic. It is a client side scripting Language.

2) What is the stable version of VBScript?

The stable version of VBScript is 5.8.

3) What are the features of VBScript?

The features of VBScript are:
It is a lightweight scripting language.

It is easy to learn.

It uses COM (Common Object Model).

It executes in host environment such as IE, IIS and WSH.

4) How can we write a simple program?

We can write a simple program by using following steps:
<html>  

<body>  

            <script language="vbscript" type="text/vbscript">  

            document.write("Hello World!")  

            </script>  

</body>  

</html>

5) What are the environments where VBScript could be run?

VBScript could be run into three environments that are:
IIS (Internet Information Server)

WSH ( Windows Script Host)

IE ( Internet Explorer)

6) How can we declare the variable in VBScript?

We can declare the variable by using DIM keyword. Example: Dim name.

7) What are the technologies used by VBScript?

VBScript use following technologies:
Functions

String manipulation

Subroutines

Data/time

Error Handling, etc.

8) Is VBScript case sensitive?

No, VBScript is case sensitive but function name, keywords , variables and identifiers are case sensitive.

9) What are string functions in VBScript?

There are various functions in VB Script:
Asc(): It returns ANSI character code.

UCase(): It conver a string to uppercasse.

InStr(): It is used to find a string within another.

Lcase(): It convert a srting to lowercase.

Ltrim(): It removes leading space from a string.

10) How can we assign a date and time value to a variable?

We can assign a date and time value to a variable by using hash symbol(#).

11) What are the operators of VBScript ?

VBScript operators are:
Arithmetic Operators

Comparison Operators

Logical (or Relational) Operators

Concatenation Operators

12) How can we create cookies in VBScript?

We can create cookies by assign a string value to the document.cookie object. Syntax:
document.cookie = "key1 = value1; key2 = value2; expires = date";

13) How can we create a class in VBScript?

We can create a class in VBScript by using enclosed within Class .... End Class. Example:
'Defining the Class  

Class classname    'Declare the object name  

...  

End Class  

' Instantiation of the Class  

Set objectname = new classname

14) How to throw an error in VBScript?

In VBScript, an error is thrown by Err.Raise. Example:
Err.Raise 6   ' Raise an overflow error.

15) Who is the developer of VBScript?

Microsoft is the developer of VBScript.

16) What are the filename extensions of VBScript?

The filename extension of VBScript are .vbs , .vbe, .wsf, .wsc.

17) What are the host environments of VBScript?

Host environment of VBScript are WSH(Windowj- Script Host), IE( Internet Explorer), IIS(Internet Information Services).

18) In VBScript how can we comment any statement?

In VBScript, we can comment with single Quote(‘). Example:
<script language="vbscript" type="text/vbscript">  

<!-  

  'comment line with single quote  

  ' Hello VBScript  

//- >  

      

</script>

19) What the rules are for declare variables?

There are following rules for declaring variable:
  • Variable Name must begin with an alphabet.
  • Variable names cannot exceed 255 characters.
  • Variables Should NOT contain a period(.)
  • Variable Names should be unique in the declared context.

20) Can we change the value of constant during the script Execution?

No the value of Constant cannot be change during the Script Execution.

21) Write an example of Do…Until loop?

The example of Do..Until loop is given below:
<!DOCTYPE html>  

<html>  

<body>  

<script language="vbscript" type="text/vbscript">  

  i=10  

  Do Until i>15  'Condition is False.Hence loop will be executed  

    ii = i + 1  

    Document.write("The value of i is : " & i)  

    Document.write("<br></br>")  

  Loop   

</script>  

</body>  

</html>

22) What are the mathematical functions used in VBScript?

In VBScript, there are various mathematical functions used like Log, Rnd, Sgn, Abs, Hex and many more.

23) Which function is used to reverse the sequence of the characters of the given string?

StrReverse() function is used to reverse the sequence of the characters of the given string.

24) Can we start an array index with negative?

No, we cannot start an array index with negative.

25) What is the use of Redim statement?

ReDim statement is used to declare dynamic array and allocate or reallocate storage space.

26) What is a Dialog Box?

Dialog Box is just like a message box. It is used to display a message to a user . Synatx:
MsgBox(prompt[,buttons][,title][,helpfile,context])

27) How to assign a data value to a variable?

Date and Time variables should be enclosed within hash symbol(#).

28) How can we create cookies in VBScript?

We can create a cookies to assign a string value to the document .cookies object. Syntax:
document.cookie = "key1 = value1; key2 = value2; expires = date";

29) What are sub procedures in VBScript?

In VBScript, sub procedures are different from function that is given below:
  • Sub procedures does not return a value
  • Sub procedures can be called without call keyword.
  • Sub procedures are always enclosed within Sub and End Sub statements.

30) What is the use of Scripting.FileSystemObject class in VBScript?

In VBScript, Scripting.FileSystemObject class is used for the developer to work with drivers, folders and files. Example:
Dim oFS, drive  

Set oFS = CreateObject("Scripting.FileSystemObject")  

Set drive = oFS.GetDrive(oFS.GetDriveName("C:\"))  

Document.write drive.VolumeName

Related Topics

Top 30 Perl interview questions for 2024

1) What is Perl? It is a programming language which is used for web development, system administration, GUI development and etc. It is also known as cross-platform programming language. 2) What are the...

4 minutes read.

Top 15 CherryPy Interview Questions for 2024

1) What is CherryPy? CherryPy is a web framework used for Python. It provides a friendly interface for Http protocol for Python developer. 2) Why we use CherryPy? CherryPy has following strength: Simplicity: It...

3 minutes read.

Top 25 Oracle DBA Interview Question for 2024

1) What is an Oracle Instance? Database instance is a set of memory structures that manages database file. When an instance is started Oracle database allocate memory area called SGA (System...

4 minutes read.

Top 40 TensorFlow Interview Questions and Answers

Commonly Asked TensorFlow Interview Questions for Fresher Q1. What is TensorFlow? TensorFlow is the machine learning library developed by Google's brain team, it supports multiple abstraction levels, and we can choose the...

13 minutes read.

Top 15 Hadoop Interview Questions for 2024

1) What is Hadoop? Hadoop is a framework which is used to store and process Big Data. It is a distributed computing platform and helps in analyzing Big Data. 2) What are the...

2 minutes read.

Top 15 XML Interview Questions for 2024

1) What is XML? XML (eXtensible Markup Language) is designed to transport and store data. It has user executive tags i.e. no pre-defined tags used as in HTML. This language is...

2 minutes read.

Top 30 WordPress Interview Questions for 2024

Most Frequently asked WordPress Interview Questions and Answers 2019 1) What is WordPress? WordPress is an open-source CMS (Content Management System) and a blogging tool. It is used to create web sites and...

5 minutes read.

Top 30 SASS Interview Questions for 2024

1) What is Sass? SASS: Systematically Awesome Style Sheets is an extension of CSS. It is also known as CSS pre-processor which helps to reduce repetition with CSS and saves time. It is...

4 minutes read.

Top 30 TypeScript Interview Questions for 2024

1) What is TypeScript? TypeScript is an object-oriented and compiled language. TypeScript is also known as a set of tools. TypeScript is used for application-scale development. 2) What are the features of TypeScript? Features of...

4 minutes read.

Top 15 VBA Interview Questions for 2024

1) What is VBA? VBA stands for Visual Basic Application. It is an event-driven programming language. It is mainly used with Microsoft Office applications such as MS -Excel, MS-Word and MS-Access. 2)...

3 minutes read.

Top 28 Angular 2 Interview Questions for 2024

1) What is Angular 2? It is an open source JavaScript framework which is used to build web applications in JavaScript and HTML. It is also used to overcome obstacles encountered while...

4 minutes read.

Top 30 PyTorch Interview Questions and Answers

Q1: What is PyTorch? Answer: PyTorch is a machine learning library for the programming language Python, based on Torch library, used for application such as natural language processing. It is free...

9 minutes read.

Top 13 SAS Interview Questions for 2024

1. What is SAS and its functions? SAS (Statistical Analysis System) is statistical software designed by SAS Institute in 1960 for data inspection and report writing. SAS runs on Windows, UNIX...

5 minutes read.

Top 15 JCL (Job Control Language) Interview Questions for 2024

1) What is JCL? JCL refers to Job Control Language. It is a command language which describes job (unit of work) for the Multiple Virtual Storage (MVS) operating system. It is...

3 minutes read.

Top 25 MySQL Interview Questions for 2024

1) What is MySQL? MySql is defined as multi-user DBMS which is built and distributed my MySQLab now acquired by Oracle Co. 2) Enlist the features of MySQL. Cross-Platform Support Wide range...

3 minutes read.

Top 15 RequireJs Interview Questions for 2024

1) What is RequireJs? RequireJs is a open source JavaScript library which is used to maintain dependencies between JavaScript files and modular programming. 2) What are the features of RequireJs? Following are the...

3 minutes read.

Top 15 Pure CSS Interview Questions for 2024

1) What is Pure CSS? Pure is a CSS (Cascading Style Sheet) framework. It is a collection of small set of responsive CSS modules. We can integrate it to any web...

5 minutes read.

Top 20 Java Programming Coding Interview Questions for 2024

Coding is an integral part of any programming language. It is the most important phase of an interview. Interviewee checks the capability of thinking of any particular. I think one...

13 minutes read.

Top 31 Koa Interview Questions for 2024

1) What is Koa? Koa is a very small framework which provides us a minimal interface to build our applications. It is quite flexible and there are numerous modules available on...

4 minutes read.

Top 15 Java OOPS Interview Questions for 2024

1) What are the advantages of Java Package? Advantages of Java package are: Provides access protection Removes naming collision Easily maintained 2) What are the types of Access Modifiers in Java? Two types...

4 minutes read.