Preface | p. xi |
Introduction | p. 1 |
Selecting Special Cells | p. 1 |
Setting a Chart's Data Point Labels | p. 3 |
Topics in Learning Excel Programming | p. 4 |
The VBA Environment | |
Preliminaries | p. 9 |
What Is a Programming Language? | p. 9 |
Programming Style | p. 11 |
The Visual Basic Editor, Part I | p. 16 |
The Project Window | p. 16 |
The Properties Window | p. 21 |
The Code Window | p. 21 |
The Immediate Window | p. 25 |
Arranging Windows | p. 26 |
The Visual Basic Editor, Part II | p. 28 |
Navigating the IDE | p. 28 |
Getting Help | p. 29 |
Creating a Procedure | p. 30 |
Run Time, Design Time, and Break Mode | p. 31 |
Errors | p. 32 |
Debugging | p. 36 |
Macros | p. 42 |
The VBA Programming Language | |
Variables, Data Types, and Constants | p. 47 |
Comments | p. 47 |
Line Continuation | p. 47 |
Constants | p. 48 |
Variables and Data Types | p. 51 |
VBA Operators | p. 68 |
Functions and Subroutines | p. 69 |
Calling Functions | p. 69 |
Calling Subroutines | p. 70 |
Parameters and Arguments | p. 71 |
Exiting a Procedure | p. 75 |
Public and Private Procedures | p. 76 |
Project References | p. 76 |
Built-in Functions and Statements | p. 78 |
The MsgBox Function | p. 79 |
The InputBox Function | p. 81 |
VBA String Functions | p. 82 |
Miscellaneous Functions and Statements | p. 85 |
Handling Errors in Code | p. 88 |
Control Statements | p. 93 |
The If...Then Statement | p. 93 |
The For Loop | p. 94 |
The For Each Loop | p. 96 |
The Do Loop | p. 96 |
The Select Case Statement | p. 97 |
A Final Note on VBA | p. 98 |
Excel Applications and the Excel Object Model | |
Object Models | p. 103 |
Objects, Properties, and Methods | p. 103 |
Collection Objects | p. 104 |
Object Model Hierarchies | p. 107 |
Object Model Syntax | p. 107 |
Object Variables | p. 109 |
Excel Applications | p. 115 |
Providing Access to an Application's Features | p. 116 |
Where to Store an Application | p. 120 |
An Example Add-In | p. 128 |
Excel Events | p. 132 |
The EnableEvents Property | p. 132 |
Events and the Excel Object Model | p. 133 |
Accessing an Event Procedure | p. 133 |
Worksheet Events | p. 134 |
WorkBook Events | p. 134 |
Chart Events | p. 135 |
Application Events | p. 136 |
QueryTable Refresh Events | p. 138 |
Custom Menus and Toolbars | p. 139 |
Menus and Toolbars: An Overview | p. 139 |
The CommandBars Collection | p. 142 |
Creating a New Menu Bar or Toolbar | p. 143 |
Command-Bar Controls | p. 144 |
Built-in Command-Bar-Control IDs | p. 147 |
Example: Creating a Menu | p. 149 |
Example: Creating a Toolbar | p. 150 |
Example: Adding an Item to an Existing Menu | p. 152 |
Augmenting the SRXUtils Application | p. 153 |
Built-In Dialog Boxes | p. 162 |
The Show Method | p. 165 |
Custom Dialog Boxes | p. 167 |
What Is a UserForm Object? | p. 167 |
Creating a UserForm Object | p. 168 |
ActiveX Controls | p. 169 |
Adding UserForm Code | p. 169 |
Excel's Standard Controls | p. 171 |
Example: The ActivateSheet Utility | p. 173 |
ActiveX Controls on Worksheets | p. 178 |
The Excel Object Model | p. 183 |
A Perspective on the Excel Object Model | p. 183 |
Excel Enums | p. 186 |
The VBA Object Browser | p. 189 |
The Application Object | p. 191 |
Properties and Methods of the Application Object | p. 194 |
Children of the Application Object | p. 219 |
The Workbook Object | p. 224 |
The Workbooks Collection | p. 224 |
The Workbook Object | p. 230 |
Children of the Workbook Object | p. 238 |
Example: Sorting Sheets in a Workbook | p. 241 |
The Worksheet Object | p. 243 |
Properties and Methods of the Worksheet Object | p. 243 |
Children of the Worksheet Object | p. 251 |
Protection in Excel XP | p. 255 |
Example: Printing Sheets | p. 257 |
The Range Object | p. 263 |
The Range Object as a Collection | p. 265 |
Defining a Range Object | p. 266 |
Additional Members of the Range Object | p. 272 |
Children of the Range Object | p. 303 |
Example: Getting the Used Range | p. 317 |
Example: Selecting Special Cells | p. 319 |
Pivot Tables | p. 332 |
Pivot Tables | p. 332 |
The PivotTable Wizard | p. 335 |
The PivotTableWizard Method | p. 339 |
The PivotTable Object | p. 341 |
Properties and Methods of the PivotTable Object | p. 347 |
Children of the PivotTable Object | p. 362 |
The PivotField Object | p. 362 |
The PivotCache Object | p. 379 |
The PivotItem Object | p. 380 |
PivotCell and PivotItemList Objects | p. 385 |
Calculated Items and Calculated Fields | p. 389 |
Example: Printing Pivot Tables | p. 391 |
The Chart Object | p. 397 |
Chart Objects and ChartObject Objects | p. 397 |
Creating a Chart | p. 399 |
Chart Types | p. 405 |
Children of the Chart Object | p. 409 |
The Axes Collection | p. 410 |
The Axis Object | p. 413 |
The ChartArea Object | p. 424 |
The ChartGroup Object | p. 425 |
The ChartTitle Object | p. 429 |
The DataTable Object | p. 430 |
The Floor Object | p. 430 |
The Legend Object | p. 431 |
The PageSetup Object | p. 433 |
The PlotArea Object | p. 433 |
The Series Object | p. 434 |
Properties and Methods of the Chart Object | p. 441 |
Example: Scrolling Through Chart Types | p. 446 |
Example: Printing Embedded Charts | p. 449 |
Example: Setting Data Series Labels | p. 454 |
Smart Tags | p. 463 |
What Are Smart Tags? | p. 463 |
Smart TagRecognizer Object | p. 464 |
SmartTag Object | p. 465 |
SmartTagAction Object | p. 466 |
SmartTagOptions Object | p. 466 |
Appendixes | |
The Shape Object | p. 471 |
Getting the Installed Printers | p. 484 |
Command Bar Controls | p. 488 |
Face IDs | p. 499 |
Programming Excelfrom Another Application | p. 505 |
High-Level and Low-Level Languages | p. 510 |
New Objects in Excel XP | p. 520 |
Index | p. 535 |
Table of Contents provided by Syndetics. All Rights Reserved. |