VBA-Excel
Home ] Schedule ] Objectives ] Policies ] TAs ] Grading ] [ VBA-Excel ] Old Exams ] Sample VBA ] Student Guide ]

 

Home
Schedule
Objectives
Policies
TAs
Grading
VBA-Excel
Old Exams
Sample VBA
Student Guide

Visual Basic in Excel

One of the best features of Visual Basic is that it is a powerful scripting language for writing macros and extensions to other programs including Excel, AutoCAD, and ArcView.  This tool is called Visual Basic for Applications (VBA).  This document gives a basic introduction on how to use VBA with Excel.

Contents

1. Getting Started

a. The Visual Basic Toolbar

b. Design Mode vs. Run Mode

c. The VB Editor

2. Adding Controls to a Spreadsheet

3. Working with Cells and Ranges

a. The Range Object

b. The Cells object

c. Working with Multiple Cells

d. Looping Through Cells

4. Recording Macros

5. Trapping for Worksheet Events

6. Creating Custom Functions

a. Format

b. Examples

c. Using Functions in VB

7. Calling Excel Worksheet Functions from VB Code

8. Custom Graphics

a. The Shape Object

b. The Shapes Collection

c. Creating Shapes

d. Deleting Shapes

e. Modifying Properties of Shapes

f. Coordinate Transformations

9. Getting Help

 

This primer was prepared by Norm Jones for CE En 270 at Brigham Young University.

Unauthorized use is strictly prohibited.