Professional Documents
Culture Documents
EXCEL
EXCEL
EXCEL
INTRODUCTION . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xxvii
▸ PART I: UNDERSTANDING THE BASICS
LESSON 1: Introducing VBA . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
LESSON 2: Getting Started with Macros . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
LESSON 3: Introducing the Visual Basic Editor . . . . . . . . . . . . . . . . . . . . . . . . . . 25
LESSON 4: Working in the VBE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
▸ PART II: DIVING DEEPER INTO VBA
LESSON 5: Object-Oriented Programming: An Overview . . . . . . . . . . . . . . . . . 49
LESSON 6: Variables, Data Types, and Constants . . . . . . . . . . . . . . . . . . . . . . . . 55
LESSON 7: Understanding Objects and Collections . . . . . . . . . . . . . . . . . . . . . . 67
LESSON 8: Working with Ranges . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 75
LESSON 9: Making Decisions with VBA . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 85
▸ PART III: BEYOND THE MACRO RECORDER:
WRITING YOUR OWN CODE
LESSON 10: Repeating Actions with Loops . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 101
LESSON 11: Programming Formulas . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 113
LESSON 12: Working with Arrays . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 127
LESSON 13: Automating Procedures with Worksheet Events . . . . . . . . . . . . . . . 137
LESSON 14: Automating Procedures with Workbook Events . . . . . . . . . . . . . . . 149
LESSON 15: Handling Duplicate Items and Records . . . . . . . . . . . . . . . . . . . . . . 161
LESSON 16: Using Embedded Controls . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 181
LESSON 17: Programming Charts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 199
LESSON 18: Programming PivotTables and PivotCharts . . . . . . . . . . . . . . . . . . . 213
LESSON 19: User-Defi ned Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 237
LESSON 20: Debugging Your Code . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 251