CITATION

Shepherd, Richard. Excel 2007 VBA Macro Programming. US: McGraw-Hill Osborne Media, 2009.

Excel 2007 VBA Macro Programming

Published:  September 2009

eISBN: 9780071627016 0071627014 | ISBN: 9780071627009
  • Contents
  • Acknowledgments
  • Introduction
  • Part I: Programming in Excel VBA
  • Chapter 1 The Basics
  • Exploring the Visual Basic Editor in Excel
  • Saving Off Your Macro
  • Enabling the Developer Item in the Excel Menu
  • Chapter 2 Variables, Arrays, Constants, and Data Types
  • Variables
  • Data Types
  • VBA Data Types
  • Arrays
  • User-Defined Types
  • Constants
  • Reserved Words
  • Chapter 3 Modules, Functions, and Subroutines
  • Modules
  • The Difference Between Subroutines and Functions
  • Writing a Simple Subroutine
  • Writing a Simple Function
  • Public and Private Functions and Subroutines
  • Argument Data Types
  • Optional Arguments
  • Passing Arguments by Value
  • Chapter 4 Programming Basics: Decisions and Looping
  • Decisions
  • Looping
  • Chapter 5 Strings and Functions and Message Boxes
  • Strings
  • Functions
  • Conversion Functions
  • Format Function
  • Date and Time Functions
  • SendKeys Command
  • Message Boxes
  • Chapter 6 Operators
  • Arithmetic Operators
  • Comparison Operators
  • Concatenation Operator
  • Logical Operators
  • Other Operators
  • Chapter 7 Debugging
  • Types of Errors
  • Design Time, Runtime, and Break Mode
  • Breakpoints
  • Using Stop Statements
  • Running Selected Parts of Your Code
  • The Debug Window
  • Events That Can Cause Problems When Debugging
  • Using Message Boxes in Debugging
  • Avoiding Bugs
  • Chapter 8 Errors and the Error Function
  • The Resume Statement
  • Implications of Error Trapping
  • Generating Your Own Errors
  • Chapter 9 Dialogs
  • Viewing Your Form
  • Displaying Your Form in Code
  • Populating Your Form
  • Default Toolbox Controls
  • Chapter 10 Common Dialog Control
  • Using the Common Dialog Control
  • Default Dialogs
  • Chapter 11 Command Bars and Buttons
  • Command Bars
  • Command Buttons
  • Part II: Object Models
  • Chapter 12 The Excel Object Model
  • Properties and Methods Explained
  • Using the Object Browser
  • Hierarchy
  • Recording Macros
  • Chapter 13 The Excel Object Model—Main Objects
  • Application Object
  • Workbook Object
  • Windows Object
  • Worksheet Object
  • Range Object
  • Chapter 14 Using Excel to Interact with Other Office Programs
  • Driving Microsoft Outlook
  • Driving Excel from Other Office Programs
  • Part III: Advanced Techniques in Excel VBA
  • Chapter 15 Charts and Graphs
  • Working with the Series Collection Object
  • Exporting a Chart as a Picture File
  • Using Macro Recording
  • Chapter 16 Working with Databases
  • ODBC Links
  • Using ADO
  • Chapter 17 API Calls
  • What Is an API Call?
  • Using an API Call
  • Chapter 18 Class Modules
  • Inserting a Class Module
  • Creating an Object
  • Creating a Collection
  • Using the PNames Collection
  • Chapter 19 Animation
  • Chapter 20 Working with XML Files
  • The XML Document
  • How Does XML Relate to VBA?
  • XML Maps
  • Customizing an XML Map
  • Importing and Exporting Data
  • Manipulating XML Files Programmatically
  • Chapter 21 The Ribbon
  • Creating a Ribbon Customization
  • Using the Custom UI Editor
  • Creating Code for Your Custom Buttons
  • Images
  • How Can You Use VBA Code with the Ribbon
  • More on the Ribbon
  • Chapter 22 Pivot Tables
  • Creating a Simple Pivot Table from the Front End of Excel
  • Creating a Pivot Table Using VBA
  • Using VBA with a Pivot Table
  • Advanced VBA for Pivot Tables
  • Points to Bear in Mind on Pivot Tables
  • Part IV: VBA in Action
  • Chapter 23 Converting Labels to Numbers and Numbers to Labels
  • Chapter 24 Transposing a Range of Cells
  • Chapter 25 Adding Formula Details into Comments
  • Chapter 26 Calculating a Range
  • Chapter 27 Reversing a Label
  • Chapter 28 Who Created the Workbook?
  • Chapter 29 Evaluating a Cell
  • Chapter 30 Sorting Worksheets into Alphabetical Order
  • Chapter 31 Replacing Characters in a String
  • Chapter 32 Timed Events
  • Chapter 33 Auto-Totaling a Matrix of Numbers
  • Chapter 34 Absolute and Relative Formulas
  • Chapter 35 Coloring Alternate Rows and Columns of the Spreadsheet
  • Chapter 36 Coloring Cells Containing Formulas
  • Chapter 37 Summing Cells by Reference to a Master Cell
  • Chapter 38 Globally Changing a Range of Values
  • Chapter 39 Displaying Hidden Sheets Without a Password
  • Chapter 40 Searching Multiple Sheets and Workbooks
  • Chapter 41 Brighten Up Your Comments
  • Test It Out
  • Chapter 42 Importing a CSV File Containing Leading Zeros
  • Chapter 43 Working with Shapes
  • Chapter 44 Turning Your VBA Code into an Add-In
  • Appendix: ASCII Character Codes
  • Index