Академический Документы
Профессиональный Документы
Культура Документы
PROGRAMMING (150706)
VBA
BASIC : Beginners All-purpose
Instruction Code English words
Symbolic
VBA
Programming language that can be built into
applications
Automate operations in applications like
MS Word, MS Excel, MS Powerpoint, Outlook, Access
VB Vs. VBA
VB
VBA
Programming Language
Implementation of VB
Applications
ActiveX
compiled
into
Codes written
platforms
for
multiple
MACROS: Basics
Sequence of commands that we can repeat
Subprocedure/Subroutine
MACROS: Basics
MS Word, Excel, Powerpoint supports VBA Macro
Recorder
Created by
Writing VBA commands in VB Editor/
Turning on Macro Readers
Record/Edit/Delete Macros
Recording a Macro
Easiest way is to use Macro Recorder
Steps:
Recording a Macro
1.
2.
3.
4.
5.
Planning a Macro
Starting the Macro Recorder
Naming the Macro
Assigning the way to run the Macro
Stop recording the Macro
1. Planning a Macro
Recording a Macro
Recording a Macro
MS Office 2003:
Tools > Macro > Record New Macro
MS Office 2007:
Enable Developer Tab
MS Office Button > Word Options > Popular >
Check Show Developer Tab in the Ribbon
Select Developer Tab & click Record Macro
Check mark it
Record Macro
Recording a Macro
Recording a Macro
Recording a Macro
click
click
Press
Alt+Cnrl+Shift
+F
click
MS Office 2007:
Enable Developer Tab
Click Stop Recording
Recording a Macro
Running/Executing a Macro
MS Office 2003:
Tools > Macro > Macros
Select Macro > Run
MS Office 2007:
Select Developer Tab, Click Macro > Run /
Click icon on title bar /
Use the shortcut keyboard key
click
click
Deleting a Macro
MS Office 2003:
Tools > Macro > Macros
Select Macro > Delete
MS Office 2007:
Select Developer Tab, Click Macro > Delete
click
Limitations
Example Macro
A macro for replacing a word college by institute
in the document.
Press Cntl+F
Select
the
Macro
for Find
and
Replace
Click
click
click
click
click
click
click
click
Width:=98, Height:=48).Select
Click to create
END