Skip to main content

Excel 2003 VBA Programmer's Reference

Excel 2003 VBA Programmer's Reference

Paul T. Kimmel, Stephen Bullen, John Green, Rob Bovey, Robert Rosenberg, Brian Patterson (Contributions by)

ISBN: 978-0-764-55660-9

Jul 2004

1176 pages

Select type: Paperback

Product not available for purchase


What is this book about?

Excel 2003 VBA Programmer's Reference is an updated and expanded version of the two previous editions now with a reference section downloadable from the Web for easy perusal. The book is aimed at Excel users who want to gain more control over their spreadsheets using VBA or who want to develop Excel applications for other users. The book starts with a primer chapter focused on bringing the readers up to speed with Excel and VBA. From there, the book expands to focus on major issues faced by advanced Excel users and developers.

What does this book cover?

In this book, you'll discover how to do the following:

  • Set up applications and convert them to add-ins
  • Package and distribute Excel applications
  • Set up interaction with other Office applications and databases
  • Program the VB Editor and use the Windows API
  • Use VB6 and VB.NET with Excel
  • Set up internationalization
  • Advanced debugging and error handling techniques
About the Authors.



Chapter 1: Primer in Excel VBA.

Chapter 2: Programming in the VBE.

Chapter 3: The Application Object.

Chapter 4: Object-Oriented Theory and VBA.

Chapter 5: Event Procedures.

Chapter 6: Class Modules.

Chapter 7: Writing Bulletproof Code.

Chapter 8: Debugging and Testing.

Chapter 9: UserForms.

Chapter 10: Adding Controls.

Chapter 11: Data Access with ADO.

Chapter 12: Creating and Using Add-ins.

Chapter 13: Automation Addins and COM Addins.

Chapter 14: Customizing the VBE.

Chapter 15: Interacting with Other Office Applications.

Chapter 16: Programming with the Windows API.

Chapter 17: International Issues.

Chapter 18: Workbooks and Worksheets.

Chapter 19: Using Ranges.

Chapter 20: Using Names.

Chapter 21: Working with Lists.

Chapter 22: PivotTables.

Chapter 23: Filtered Lists.

Chapter 24: Generating Charts.

Chapter 25: Office Files and Folders.

Chapter 26: Command Bars.

Chapter 27: SmartTags.

Chapter 28: Excel and the Internet.

Chapter 29: XML and Excel.

Appendix A: Excel 2003 Object Model.

Appendix B: VBE Object Model.

Appendix C: VBE Object Model.


Code Downloads
Code Downloads
Code downloads for this title are available here.
Code Downloads
Code Downloads
Code downloads for this title are available here.
Download the code and Excel files for the book in .ace format at less than 1/2 the size of the .zip.
Go to if your archive software doesn't support the .ace format.
Missing Appendix
Download Updated Code for Chapter 26

This code was updated on Nov. 1st, 2006 to include command bars that were missing from the original download. If you originally downloaded this before Nov. 1st, redownload this updated version.

The code examples for this title are stored in a ZIP archive. To open it, you will need a computer with software capable of opening ZIP files. If you do not already have this capability, you can download a free trial of WinZip.

Error in Code / Download Ch. 26 Command Bars
ChapterPageDetailsDatePrint Run
Code Replacement / Errata Download
The content for this title has been posted and may be accessed via:,descCd-download_code.html

Code DownloadProblems with code downloads
If you are experiencing problems with the code for this book, you can try the code downloads for the 2002 version of this book, which is located here.

38Missing Verb in Sentence
The text in first gray box reads: "Note that subroutines and functions can both accept arguments. However, you cannot subroutine with input parameters directly by pressing F5."

The second sentence is missing a verb between "cannot" and "subroutine"

52Duplicate Code
Code Lines "i = i + 1" at the very bottom of the page.

The code is meant to simulate a password login with only 3 attempts to enter the correct password. The 3 attempts only work if the mentioned line is only used once, and not twice as dictated in the book.

9179Error in Code Block
In the code block at the end of the page, the following text is missing on line 13:
“Select Case Data(1, 3)”

207Error in Text
second shaded passage:
If Connection.State = ObjectStateEnum.adStateOpen) Then objConn.Close.

Should be:
If (Connection.State = ObjectStateEnum.adStateOpen) Then Connection.Close

211Error in Text
Final paragraph on page 211 starts:
"Line declares the WithEvents statement".
Should be:
"Line 2 declares the WithEvents statement"

446Error in Code Box at
Code in the grey box at the bottom of page 446 should be corrected as follows:

Public Sub AddNewData()

Dim lRows As Long

With Range("DataBase")
lRows = .Rows.Count + 1
Range("Input").Copy Destination:=.Cells(lRows, 1)
.Resize(lRows).Name = "Database"
End With

End Sub

AppendixMissing Appendix for download
Please go to the download page to download the missing appendix.

Back CoverThis book does not cover VB.Net with Excel
On the back cover it mentions that included in this book's contents you will learn how to use VB.Net with Excel.

This book does not cover that.

26Updated Files for Chapter 26
Download updated code for Chapter 26 from the Download page.