Microsoft VBA Programming Study Guide

 study guide 0-619-06820-5 © 2001
Publish date: March 22, 2001
454 pages

Buy Now: $69.99

Course ID: microsoft-vba-prog-sg

If you're a beginning programmer who wants to learn how to write procedures with the VBA language, consider choosing the Microsoft VBA Programming study guide from our selection of computer training books. This course allows you to create procedures to customize Microsoft Office 2000 applications so that your applications work the way you would like them to work.

The Microsoft VBA Programming courseware is an excellent introduction to the world of VBA programming. Interactive exercises let you learn the steps and help ensure your success. You'll learn how to use the Visual Basic Editor, work with the Object Model, use the object and string variables, work with date variables, work with numeric variables, use the selection structure, work with Select Case statements, work with MsgBox functions, work with repetition structures, and use string functions.

Other topics that the Microsoft VBA Programming courseware covers include using the built-in dialog boxes and the Office Assistant, custom dialog boxes, option buttons, check boxes, box controls, automation, and error trapping.

This courseware can be used on its own as a self-directed study program or you can enhance your existing programming training courses by following the manual. No matter how you use it, as a standalone course or as a supplemental training aid, you will learn how to begin programming using Microsoft VBA.

Course Contents

Unit 1introduces the Visual Basic Editor

  • Exploring the Visual Basic Editor interface
  • Using Visual Basic Editor
  • Coding an Excel workbook object's event procedure
  • Saving and running the workbook object's event procedure
  • How to code "GetGenius" macro procedures
  • Coding document object's event procedure
  • How to save and run document object's event procedure
  • How to code the DisplayDate macro procedure
  • How to code the form object's close event procedure
  • How to save and run the form object's close event procedure
  • How to code the CancelAssistant macro procedure

Unit 2 covers using the Object Model

  • Exploring the Object Model
  • Accessing Help in the Object Browser
  • Working with the Immediate window
  • Working with the Object Browser
  • Working with the Immediate window in Excel
  • Referencing range objects
  • Working with the Object Browser in Word
  • Working with the Immediate window
  • Working with the Range object's select method
  • Working with the Object Browser
  • Working with the Immediate window in Access

Unit 3 covers using the object variables

  • Variables
  • Object variables
  • Reserving procedure-level variables
  • Working with the Set Statement
  • Creating "FormatWorksheet" macro procedures
  • How to enter values and formulas into range objects
  • How to format and previw worksheet objects
  • How to create the FormatPromo macro procedure
  • Working with the ApplyTheme instruction
  • Adding hyperlinks to a document
  • How to create the DisplayByGrade procedure
  • Ordering records in reports
  • How to create the DisplayByGradeMacro macro

Unit 4 covers using string variables

  • Reserving procedure-level string variables
  • Assignment statements
  • InputBox functions
  • Concatenating strings
  • Val functions
  • Option Explicit statements
  • How to code the workbook's open event procedure
  • How to create a Facsimile Transmittal sheet
  • How to create the Fax Transmittal macro procedure
  • How to create a custom toolbar and button
  • How to create the SelectFieldOrder procedure
  • How to create the SelectFieldOrderMacro macro

Unit 5 covers using date variables

  • Reserving procedure-level date variables
  • Assigning values to date variables
  • Working with VBA's Date, Time, and Now functions
  • Working with the Format function
  • Working with Dates and Times in calculations
  • How to convert strings to dates
  • How to create the CalcHours macro procedure
  • Working with the Offset property
  • How to code the PrintInvitation procedure
  • How to create the AssignDates procedure
  • How to create a custom toolbar and button

Unit 6 discusses using numeric variables

  • Reserving procedure-level numeric variables
  • Working with Assignment statements
  • How to create a list box
  • How to code the List Box's DblClick event procedure
  • Working with the Excel VLookup function in a procedure
  • How to code the UpdateMembership procedure
  • Searching tables
  • ADO Object Model
  • How to code the PaymentUpdate procedure
  • Working with the Recordset Object's Find method

Unit 7 covers working with the selection structure

  • Working with the "If.Then.Else" statement
  • Working with the nested "If.Then.Else" statement
  • Working with the PublishObjects collection
  • How to code the Publish Calculator procedure
  • Working with the TablesOfContents collection
  • How to code the CreateToc procedure
  • How to modify the PaymentUpdate procedure

Unit 8 covers working with Select Case statements and MsgBox functions

  • Working with the Select Case statement
  • Working with the MsgBox function
  • Working with Microsoft Query
  • How to code the DisplaySales macro procedure
  • How to code the GenerateLabels procedure
  • How to code the DisplayReport procedure

Unit 9 discusses using repetition structures and With statements

  • The For.Next statement
  • The For Each.Next statement
  • The With statement
  • How to modify the DisplaySales procedure
  • Opening, activating, and closing documents
  • How to insert text in a document
  • How to code the PrintAndRecordInfo procedure
  • How to create the PostScores procedure

Unit 10 covers advanced repetition structure and string functions

  • Working with Do.Loop statements
  • Working with VBA manipulations functions
  • How to code the BreakNameApart procedure
  • How to code the SortAndRemoveDuplicates procedure
  • How to code the LocateInstructor procedure

Unit 11 discusses using built-in dialog boxes and the Office Assistant

  • Working with the dialogs collection
  • Working with the Office Assistant
  • How to code the SortAndShade procedure
  • Displaying the Sort dialog box in Excel
  • The ColorIndex property
  • How to assign the Range object's Cells property
  • How to code the PrintClientList procedure
  • Working with the Range object's InsertDatabase method
  • How to code the LocateInstructor procedure
  • Working with OpenReport's WhereCondition argument

Unit 12 discusses using custom dialog boxes

  • Windows standards
  • Set tab orders and setting keyboard access to a control
  • How to add forms to the project
  • Working with the Toolbox for adding controls to the form
  • How to size, move, delete, save, and restore controls
  • How to add an existing form to a project
  • How to set control properties
  • How to code a controls' event procedures in the Update Inventory dialog box
  • How to code a controls' event procedures in the ClientList dialog box
  • How to code the Command button controls

Unit 13 goes over using the option button, check box, and list box controls

  • Dialog box controls
  • How to add option buttons and list boxes
  • How to code the form's Initialize event
  • Working with the AddItem method
  • How to code the Calculate button's click event procedure
  • How to code the CalculateSales macro
  • How to code the form's Initialize event
  • How to code the Enter button's click event procedure
  • How to modify the Locate button's click event procedure

Unit 14 covers automation

  • Understanding the Automation process
  • How to code the IssueCertificate procedure
  • How to code the Enter Information button's click event procedure
  • How to code the Create Letter button's click event procedure

Unit 15 details advanced automation and error trapping

  • Working with the GetObject function
  • How to intercept and handle run-time errors
  • Working with the Resume statement
  • How to prevent multiple instances of an application
  • How to modify the OpenMemo procedure
  • How to modify the CreateCertificate procedure
  • How to create the Letter button's click event procedure
  • How to modify the cmdCreate control's click event procedure