Professional Documents
Culture Documents
in Excel
Excel Ninjaz Secrets only at the Manila Excel Ninjaz
Meetup
Rowen Remis R. Iral
http://wenup.wordpress.com
2017 November 16
Rowen Remis Iral
Certified IT Engineer
Data Science / Analytics freelancer
Other Interests:
Marketing
Business
Economics
Genomics / Bioinformatics
Motivation
I am always doing
that which I
cannot do, in
order that I may
learn how to do
it.
-Pablo Picasso
Agenda
What is VBA
Uses of VBA
Setting up Your Excel Ninja Machine
Tour of the VBA IDE
Hello World
Excel Objects
What is VBA?
Visual Basic for Applications (VBA)
Click Options
Setting up Your Excel Ninja Machine
Click
Customize Ribbon
Setting up Your Excel Ninja Machine
Check Developer
Setting up Your Excel Ninja Machine
Click OK
Setting up Your Excel Ninja Machine
Click
Visual Basic beside Macros
Alt+F11
VBA IDE
VBA IDE
VBA IDE
Project Explorer
VBA IDE
Object
Properties
VBA IDE
Double-Click Sheet 1
VBA IDE
Programmable Objects
VBA IDE
Current
Workbook Object
VBA IDE
Lets Code
Hello World
Select the Code
Hello World
As Instructed
A message box
Pop-ups with
Hello world
Hello World
Click
OK to Close
Hello World Another way to Run Code
1
2
Hello World
When you
Run without Selection
Hello World
Run
Hello World
Prompt appears
Select a Module
Hello World
Click Run
Hello World
It runs.
Click OK to close.
Hello World
Selector in
Properties Window
For Objects
Hello World
Switch to
Excel
Design Mode
Click
Design Mode
Design Mode
Click
Insert
To Insert
Controls
Design Mode
Click Button
to insert a button
Design Mode
Drawing a
Button
Design Mode 2
1
Create a new
Macro code for the Button.
Design Mode
A button
was created
Design Mode
In VBA
Another way to
access Properties
Design Mode
For running
Excel files with
Macros
Design Mode
Lets get to
Design Mode
Design Mode
In VBA, a module
Was created. Module1
Click
Assign Macro
Design Mode
Select the
Function / Macro
Design Mode
Select the
Sub Main()
Design Mode
Click Run
Design Mode
Hello World
Design Mode
Click the
Button 1
Design Mode
Click OK to close
Design Mode
Insert another
Button
Design Mode
Drag to Draw
Another Button
Design Mode
Create a
New Sub / Function Name
Design Mode
Output
Design Mode
This part,
Well attach
Code to new
Button
Design Mode
Right-click the
New button.
Type the
Alternative
Text and Click
OK.
Design Mode
Change
Button Label