Office 2000: Macro Programming Using Visual Basic for Applications
Course description
Overview: Students will learn to create and edit macros, and gain an understanding of VBA code.
Prerequisites: Windows Orientation, Excel 2000: Worksheets, Excel
2000: Advanced,
3Word 2000: Level 1, Word 2000: Level 2, and Word 2000: Advanced or
equivalent knowledge.
Target student: Students enrolling in this course should understand the basic concepts involved in working with a personal computer (PC). For example, they should be familiar with the components that make up the personal computer, including input, output, and storage devices.
Performance-based objectives
Lesson objectives help students become comfortable with the course, and also provide a means to evaluate learning. Upon successful completion of this course, students will be able to:
* Run macros and explain the basics of a Visual Basic Module.
* Create relative and absolute recorded macros and assign macros to various objects in a workbook.
* Write procedures that test conditions and then run only certain statements based on the results.
* Write procedures that execute one or more lines of code repetitively.
* Store Excel macros so they are available in any workbook.
* Create macros in Word 2000.
* Create macros that interact with the user.
Course content
Lesson 1: Introduction to Visual Basic for Applications
Running a macro
Recording a macro
Examining module design
Lesson 2: Assigning macros
Specifying the location of recorded macros
Assigning macros to menus, buttons, and toolbars
Lesson 3: Creating decision-making code
The If…Then decision structure
The If…Then…Else decision structure
The Select Case decision structure
Lesson 4: Using loop structures
Using a For…Next statement
Using a Do…Loop statement
Using a For Each…Next statement
Lesson 5: Macro management
Personal Macro Workbook
Assigning Sub procedures to run automatically
Lesson 6: Recording a macro in Word 2000
Running a macro
Recording a macro
Lesson 7: Interactive macros
Creating a custom message box
Creating a custom input box
Extracting data from Excel
Appendix A: Using macros in PowerPoint and Access
Using macros in PowerPoint
Using macros in Access
Appendix B: Debugging and testing code
Overview of debugging