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

Procedural Programming OOP - Object Oriented Programming OBP - Object Based Programming

This document provides an overview of key concepts in Visual Basic for Applications (VBA) including the integrated development environment (IDE), data types, operators, software development life cycle, classes, objects, properties, methods, events, modules, variables, and scope qualifiers. It also lists some active objects in the Excel VBA application object model including the Application, Workbook, Worksheet, Range, Cell, and Selection objects.

Uploaded by

Anurag Agarwal
Copyright
© © All Rights Reserved
Available Formats
Download as XLSX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
106 views

Procedural Programming OOP - Object Oriented Programming OBP - Object Based Programming

This document provides an overview of key concepts in Visual Basic for Applications (VBA) including the integrated development environment (IDE), data types, operators, software development life cycle, classes, objects, properties, methods, events, modules, variables, and scope qualifiers. It also lists some active objects in the Excel VBA application object model including the Application, Workbook, Worksheet, Range, Cell, and Selection objects.

Uploaded by

Anurag Agarwal
Copyright
© © All Rights Reserved
Available Formats
Download as XLSX, PDF, TXT or read online on Scribd
You are on page 1/ 8

VBA

Visual Basic for Applications


IDE
Integrated Development Environment
File Extension Macro Enabled Workbook
i Procedural Programming
ii OOP - Object Oriented Programming
iii OBP - Object Based Programming
SDLC

Data Type

Operators

Software Development Life Cycle


i Problem Definition
ii Feasibility Study and Requirements Gathering
iii Design
iv Coding
v Testing
vi Controling
vii Maintenance
Defines the type & size of the data being stored in the variable
i Primary
a. Numeric
b. Date
c. String
ii Secondary
a. Variant - used when the data type stored in the variable could vary at runtime
b. Object - a pointer which stores the location of he object pointed in the RAM

A symbol/phrase used to perform operations of a specific nature on one or more ope


i Arithmetic
ii Relational
iii Logical
iv Other

CLASS
OBJECT
*.xlsm
C, etc
C++, JAVA, etc
.NET, VBA, etc

Property
Method
Event
Module
i
ii
iii

Gathering

Variable

Scope Qualifier
being stored in the variable
Float, Integer, Byte etc.
8 bytes
Fixed length, Variable length

e stored in the variable could vary at runtime


he location of he object pointed in the RAM

perations of a specific nature on one or more operands


+ - * / ^ Mod
= <> < > <= >=
AND OR NOT XOR
=,'()&

i
ii
iii
iv

Data and the code which manipulates the data


Class is implemented and INSTANCE of class is created
Defines the appearance and behaviour of the object
Interface through which an object is issued a command to perform an action
Occurance of certain action on the object
A set of variables and/or constants and/or procedures
All VBA coding is done in modules
Standard Module (.bas)
Form Module (.frm)
Class Module (.cls)
A named location in the computer's main memory (RAM)
Used for storing, retrieving and manipulating data of a certain type
Defines the visibility and lifetime of a variable
Dim
Private
Public
Static

Active Objects of Excel VBA:


1 Selection
2 ActiveCell
3 ActiveSheet
4 ActiveWindow
5 ActiveChart
6 ActiveWorkbook
7 ActivePrinter

Application

Session

Workbook

Worksheet

Range

Cell

application

Procedure
Variable Declaration

Syntax
<scope qualifier> <var. name> [As <data type>]

<>
[]

Rules
Compulsory component
Optional component

Example
Dim x as Integer
Private abc as String
Dim abc as String*50
Public myVar_01 as Variant
Static stc as Static

You might also like