Contents
|
Index
|
Search
Table of Contents
BackCover
Excel VBA Macro Programming
Introduction
Objective of This Book
Part I: Programming in Excel VBA
Chapter 1: The Basics
Chapter 2: Variables, Arrays, Constants, and Data Types
Data Types
VBA Data Types
Arrays
User-Defined Types
Constants
Reserved Words
Chapter 3: Modules, Functions, and Subroutines
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
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
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
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
Chapter 16: Working with Databases
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
Part IV: VBA in Action
Chapter 20: Converting Labels to Numbers and Numbers to Labels
Chapter 21: Transposing a Range of Cells
Chapter 22: Adding Formula Details into Comments
Chapter 23: Calculating a Range
Chapter 24: Reversing a Label
Chapter 25: Who Created the Workbook?
Chapter 26: Evaluating a Cell
Chapter 27: Sorting Worksheets into Alphabetical Order
Chapter 28: Replacing Characters in a String
Chapter 29: Timed Events
Chapter 30: Auto Totaling a Matrix of Numbers
Chapter 31: Absolute and Relative Formulas
Chapter 32: Coloring Alternate Rows and Columns of the Spreadsheet
Chapter 33: Coloring Cells Containing Formulas
Chapter 34: Summing Cells by Reference to a Master Cell
Chapter 35: Globally Changing a Range of Values
Chapter 36: Displaying Hidden Sheets Without a Password
Chapter 37: Searching Multiple Sheets and Workbooks
Chapter 38: Brighten Up Your Comments
Chapter 39: An Alternative to Message Boxes
Chapter 40: Working with Shapes
Chapter 41: Turning Your VBA Code into an Add-In
Appendix A: ASCII Character Codes
Index
Index_B
Index_C
Index_D
Index_E
Index_F
Index_G
Index_H
Index_I
Index_K
Index_L
Index_M
Index_N
Index_O
Index_P
Index_Q
Index_R
Index_S
Index_T
Index_U
Index_V
Index_W
Index_X
Index_Y
Index_Z
List of Figures
List of Tables