0% found this document useful (0 votes)
15 views3 pages

mod6

Uploaded by

Aritra Mallick
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)
15 views3 pages

mod6

Uploaded by

Aritra Mallick
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/ 3

VBA is:

A. a Microsoft programming language used to extend Excel functions


B. a statistical tool developed by Microsoft for financial analysts
C. an open-source programming environment
D. a Microsoft programming environment that replaces Excel

Which of the following VBA windows shows the code of the active object?
A. Explorer Window
B. Properties window
C. Immediate window
D. Code window

When the user clicks a button, _________ is triggered.


A. an event
B. a method
C. a setting
D. a property

5 marks

What are different types code modules available with VBE ? What is the difference between
procedure and function

Code Module: Default Modules which we use to write all procedures and functions
UserForms: UserForms helps to develop GUI (Graphical User Interface) applications.
Class Modules: Class module allows to create new objecs and define methods, properties
and events. Also, it will allow to enhance the existing objects.

Procedures or Subroutines will not return a value; functions will return values.

Why do we need to use macros?What is the basic object model of Excel?

A macro is nothing but set of instructions which are stored in Visual Basic module in a VBA
Editor. It helps in automating common repetitive tasks on daily, weekly or monthly basis by
running macro. Using macros, we can save lot of time, increase productivity and on time
delivery to customers.

Application –> Workbooks –> Worksheets –> Range / Chart


15 marks

Q.What is VBA?What are datatypes and name some datatypes?What is variant datatype and
explain it?What are scope of variable?

VBA stands for Visual Basic for Applications.

VBA is Programming language available in MS Office Tools.

Data types helps to declare Variables with specific data, this helps to VBA to know the
type of the data and assign the memory based on the DataType of the Variable.

1. Boolean
2. Byte
3. Currency
4. Date
5. Double
6. Integer

Variant data type is default data type and it can hold any type of data. This will allocate
maximum memory to hold the Varian Type. We use Variant data-type when we dot know the
type of the data or to accept the multiple data types in a single variable.

We can define variable in different levels:

• Local Level: Variables which are defined with DIM statement in a procedure or
functions
• Module Level: Which are defined with DIM statement on top of a module, can
be accessed in entire module
• Global Level: Which are defined Public statement at top of any module, can
be accessed in entire project.

Q.How do I stop recording macros?How do I delete macros from workbook?Difference


between ByVal and ByRef
Step 1: Go To Developer tab from the main ribbon of Excel window.
Step 2: Click on ‘Stop Recording’ command button to stop from the recording macro.

Please find the following steps to delete macros from the workbook.
Step 1: Go To Developer tab from the main ribbon of Excel window.
Step 2: Click on the Macros command button to see the available macros in the active
workbook.
Step 3: Once you click on the Macros command button, Macro dialog box will appear on the
screen.
Step 4: Select macro name which you want to delete macro and then click on ‘Delete’
command button.
Step 5: Now, It will show the confirmation dialog box. Click on Ok to delete the macro.

ByVal:
Specifies that an argument is passed in such a way that the called procedure or property
cannot change the value of a variable underlying the argument in the calling code.
ByRef:
Specifies that an argument is passed in such a way that the called procedure can change the
value of a variable underlying the argument in the calling code.

15 marks

You might also like