VBA MCQ Questions and Answers [PDF] 435 MCQs

VBA MCQ questions and answers. Microsoft Excel Visual Basic for application macros objective type multiple choice question answer with pdf for computer related all competitive exams. Helpful for COPA, CCC, Gate etc.

VBA MCQ Questions and Answers

  1. Which VBA built in function returns location at the second string occurs within the first string?

A) Mid()         

B) Chr()         

C)ASC()        

D) Instr()

Ans. d

2. Which keyword is used to declare the variables in project scope?

A Static         

B Private       

C Public        

D Protect

Ans. c

3.In VBA, How many types of access specifiers available in VBA?

A 2                 

B 3                 

C 4                 

D 6

Ans. a

4. Which type of variable cannot be declared within a procedure in VBA?

A Project scope       

B Local scope          

C Global scope        

D Module scope

Ans. d

5. Which variable recognized only within the procedure in which it is declared?

A Local scope          

B Module scope      

C Global scope        

D Project scope

Ans. a

6.How many levels of variable scope available in VBA?

A 2                 

B 3                 

C 4                 

D 7

Ans. c

7.What will be the output of the following VBA code?

Debug.printformat(#1/1/2017#,”yyyy/mm/dd”)

A 1/1/2017                            

B Sun, Jan01, 2017

C 2017/01/01                       

D Sunday, January 01, 2017

Ans. c

8.Which function returns true if the expression is a valid date, otherwise it returns false in VBA?

A CDate()     

B IsDate()     

C Day()         

D Dateadd()

Ans. b

9.Which function returns the day of the month (number from 1 to 31) given date value in VBA?

A Day()                      

B Date()        

C Month()                 

D Date part()

Ans. a

10.Which color of dot indicate the breakpoint in VBA?

A Grey           

B Yellow       

C Maroon     

D Red

Ans. d

11.Which shortcut key is used to set the properties of form while designing?

A F4               

B Ctrl + F4                

C Alt + F4                 

D Shift + F4

Ans. a

12.Which shortcut key is used to open code window in VBA?

A F7               

B Alt + F7                 

C Ctrl + F7                

D Shift + F7

Ans. a

13.Which code is used to display a user form in VBA?

A Load user Form1                         

B User Form1.Show

C User Form1.Show False            

D User Form1.Load

Ans. b

14.Which character is to be suffixed for long data type in VBA?

A &     

B !                  

C #                 

D @

Ans. a

15. How many numeric data types available in Excel VBA?

A 4                 

B 5                 

C 7                 

D 8

Ans. c

16.What is the another name for keywords in VBA?

A Literals      

B Variables              

C User defined words        

D Reserved words

Ans. d

17.Which key word is used to declare the variable in VBA?

A Sub            

B Declare     

C Dim            

D AS

Ans. c

18.Which entitie hold data in VBA?

A Literals      

B Constants

C Keywords

D Variables

Ans. d

20.Which worksheet method is used to copy a sheet to another location in the workbook?

A Activate     

B Copy          

C Save AS   

D Select

Ans. b

21.Which VBA worksheet property return or sets a string value that represents the object name?

A Name         

B Index         

C Range       

D Cells

Ans. a

22.Which method displays the data form associated with the worksheet in VBA?

A Copy          

B Printout     

C Show Data Form             

D Select

 Ans. c

23. Which VBA property returns a range object that represents all the cells on the worksheet?

A Cells          

B Rows         

C Index         

D Name

Ans. a

24.Which object is member of the workbook?

A Sheets       

B Workbook

C Worksheet            

D Range

Ans. c

25.Which type of work book method cannot be modified in VBA?

A Close         

B Save          

C Save AS   

D Protect

Ans. d

26.Which workbook property returns the name of the object including its path on disk in VBA?

A Full name

B Name        

C Path           

D Worksheets

Ans. a

27.Which type of list box enables one choice of adjacent choice in VBA?

A Drop down list                              

B Single – selection list box

C Multiple – selection list box        

D Extended – selection list box

Ans. c

28.Which button has three states in VBA?

A Option button                   

B Spin button

C Push button                     

D Command button

Ans. a

29.Which box groups related controls into one visual unit in a rectangle with an optional label?

A Label box              

B Group box                        

C List box                 

D Combo box

Ans. b

30.Where does Excel come in object hierarchy of VBA?

A Range object                    

B Workbook object

C Worksheet object            

D Application object

Ans. d

31.Which shortcut key is used to open project explorer window in VBA?

A Ctrl + R      

B Ctrl + P      

C Ctrl + W     

D Ctrl + E

Ans. a

32.Which shortcut key is used to open VBA Editor from the Excel worksheet?

A Ctrl + F11              

B Alt + F11               

C Ctrl + V                  

D Ctrl + F7

Ans. b

33.Which shortcut key is used to step into line – by – line execution in VBA?

A F2               

B F4              

C F5              

D F8

Ans. d

34.What is called the set of commands bundled together under one name?

A Properties             

B Macros                  

C Procedures          

D Events

 Ans. b

35.What is called the set of statement that are executed under one name?

A Macros      

B Properties             

C Procedures          

D Events

Ans. c

36.Which one is attributes of an object in VBA?

A Procedures           

B Events       

C Macros      

D Properties

Ans. d

37.What is called double clicking an object in VBA?

A Events       

B Macros      

C Procedures          

D Methods

Ans. a

38.Which is used to type / edit the programming code in VBA?

A Form window                   

B Properties window

C Immediate window          

D Visual basic editor

Ans. d

39.Which simplifies the work to be eliminating or rewriting the code in VBA?

A Class         

B Object        

C Macros      

D Functions

Ans. c

40.Which type of variable can be accessed or used by subroutines outside the modules in  VBA?

A Static         

B Private       

C Protect       

D Public

Ans. d

VBA MCQ Questions and answers [PDF Download] 435 MCQs
Computer GK [10000 MCQ PDF] Questions for Competitive Exams
WhatsApp Channel Join Now
Telegram Channel Join Now
Instagram Page Join Now