Buying Options
Writing Excel Macros with VBA, Second Edition
Print $39.99
Add to Cart
Print+Ebook $43.99
Add to Cart
Ebook $31.99
Add to Cart
Safari Books Online
Add to Cart
What is this?
Print £30.99
Add to Cart
What is this?

Product Editions

  1. Writing Excel Macros with VBA, Second Edition - June 2002
  2. Writing Excel Macros - May 1999 (out of print)
Description
To achieve the maximum control and flexibility from Microsoft® Excel often requires careful custom programming using the VBA (Visual Basic for Applications) language. Writing Excel Macros with VBA, 2nd Edition offers a solid introduction to writing VBA macros and programs, and will show you how to get more power at the programming level: focusing on programming languages, the Visual Basic Editor, handling code, and the Excel object model.
Full Description
Table of Contents
  1. Chapter 1 Introduction

    1. Selecting Special Cells

    2. Setting a Chart's Data Point Labels

    3. Topics in Learning Excel Programming

  2. The VBA Environment

    1. Chapter 2 Preliminaries

      1. What Is a Programming Language?
      2. Programming Style
    2. Chapter 3 The Visual Basic Editor, Part I

      1. The Project Window
      2. The Properties Window
      3. The Code Window
      4. The Immediate Window
      5. Arranging Windows
    3. Chapter 4 The Visual Basic Editor, Part II

      1. Navigating the IDE
      2. Getting Help
      3. Creating a Procedure
      4. Run Time, Design Time, and Break Mode
      5. Errors
      6. Debugging
      7. Macros
  3. The VBA Programming Language

    1. Chapter 5 Variables, Data Types, and Constants

      1. Comments
      2. Line Continuation
      3. Constants
      4. Variables and Data Types
      5. VBA Operators
    2. Chapter 6 Functions and Subroutines

      1. Calling Functions
      2. Calling Subroutines
      3. Parameters and Arguments
      4. Exiting a Procedure
      5. Public and Private Procedures
      6. Project References
    3. Chapter 7 Built-in Functions and Statements

      1. The MsgBox Function
      2. The InputBox Function
      3. VBA String Functions
      4. Miscellaneous Functions and Statements
      5. Handling Errors in Code
    4. Chapter 8 Control Statements

      1. The If...Then Statement
      2. The For Loop
      3. The For Each Loop
      4. The Do Loop
      5. The Select Case Statement
      6. A Final Note on VBA
  4. Excel Applications and the Excel Object Model

    1. Chapter 9 Object Models

      1. Objects, Properties, and Methods
      2. Collection Objects
      3. Object Model Hierarchies
      4. Object Model Syntax
      5. Object Variables
    2. Chapter 10 Excel Applications

      1. Providing Access to an Application's Features
      2. Where to Store an Application
      3. An Example Add-In
    3. Chapter 11 Excel Events

      1. The EnableEvents Property
      2. Events and the Excel Object Model
      3. Accessing an Event Procedure
      4. Worksheet Events
      5. WorkBook Events
      6. Chart Events
      7. Application Events
      8. QueryTable Refresh Events
    4. Chapter 12 Custom Menus and Toolbars

      1. Menus and Toolbars: An Overview
      2. The CommandBars Collection
      3. Creating a New Menu Bar or Toolbar
      4. Command-Bar Controls
      5. Built-in Command-Bar-Control IDs
      6. Example: Creating a Menu
      7. Example: Creating a Toolbar
      8. Example: Adding an Item to an Existing Menu
      9. Augmenting the SRXUtils Application
    5. Chapter 13 Built-In Dialog Boxes

      1. The Show Method
    6. Chapter 14 Custom Dialog Boxes

      1. What Is a UserForm Object?
      2. Creating a UserForm Object
      3. ActiveX Controls
      4. Adding UserForm Code
      5. Excel's Standard Controls
      6. Example: The ActivateSheet Utility
      7. ActiveX Controls on Worksheets
    7. Chapter 15 The Excel Object Model

      1. A Perspective on the Excel Object Model
      2. Excel Enums
      3. The VBA Object Browser
    8. Chapter 16 The Application Object

      1. Properties and Methods of the Application Object
      2. Children of the Application Object
    9. Chapter 17 The Workbook Object

      1. The Workbooks Collection
      2. The Workbook Object
      3. Children of the Workbook Object
      4. Example: Sorting Sheets in a Workbook
    10. Chapter 18 The Worksheet Object

      1. Properties and Methods of the Worksheet Object
      2. Children of the Worksheet Object
      3. Protection in Excel XP
      4. Example: Printing Sheets
    11. Chapter 19 The Range Object

      1. The Range Object as a Collection
      2. Defining a Range Object
      3. Additional Members of the Range Object
      4. Children of the Range Object
      5. Example: Getting the Used Range
      6. Example: Selecting Special Cells
    12. Chapter 20 Pivot Tables

      1. Pivot Tables
      2. The PivotTable Wizard
      3. The PivotTableWizard Method
      4. The PivotTable Object
      5. Properties and Methods of the PivotTable Object
      6. Children of the PivotTable Object
      7. The PivotField Object
      8. The PivotCache Object
      9. The PivotItem Object
      10. PivotCell and PivotItemList Objects
      11. Calculated Items and Calculated Fields
      12. Example: Printing Pivot Tables
    13. Chapter 21 The Chart Object

      1. Chart Objects and ChartObject Objects
      2. Creating a Chart
      3. Chart Types
      4. Children of the Chart Object
      5. The Axes Collection
      6. The Axis Object
      7. The ChartArea Object
      8. The ChartGroup Object
      9. The ChartTitle Object
      10. The DataTable Object
      11. The Floor Object
      12. The Legend Object
      13. The PageSetup Object
      14. The PlotArea Object
      15. The Series Object
      16. Properties and Methods of the Chart Object
      17. Example: Scrolling Through Chart Types
      18. Example: Printing Embedded Charts
      19. Example: Setting Data Series Labels
    14. Chapter 22 Smart Tags

      1. What Are Smart Tags?
      2. SmartTagRecognizer Object
      3. SmartTag Object
      4. SmartTagAction Object
      5. SmartTagOptions Object
  5. Appendixes

    1. Appendix A The Shape Object

      1. What Is the Shape Object?
      2. Z-Order
      3. Creating Shapes
      4. Diagram, DiagramNode, and DiagramNodeChildren Objects
    2. Appendix B Getting the Installed Printers

    3. Appendix C Command Bar Controls

      1. Built-in Command-Bar Controls
    4. Appendix D Face IDs

    5. Appendix E Programming Excelfrom Another Application

      1. Setting a Reference to the Excel Object Model
      2. Getting a Reference to the Excel Application Object
    6. Appendix F High-Level and Low-Level Languages

      1. BASIC
      2. Visual Basic
      3. C and C++
      4. Visual C++
      5. Pascal
      6. FORTRAN
      7. COBOL
      8. LISP
    7. Appendix G New Objects in Excel XP

  1. Colophon

View Full Table of Contents
Product Details
Title:
Writing Excel Macros with VBA, Second Edition
By:
Steven Roman, PhD
Publisher:
O'Reilly Media
Formats:
  • Print
  • Ebook
  • Safari Books Online
Print Release:
June 2002
Ebook Release:
December 2008
Pages:
576
Print ISBN:
978-0-596-00359-3
| ISBN 10:
0-596-00359-5
Ebook ISBN:
978-0-596-15946-7
| ISBN 10:
0-596-15946-3
Customer Reviews
Colophon

Our look is the result of reader comments, our own experimentation, and feedback from distribution channels. Distinctive covers complement our distinctive approach to technical topics, breathing personality and life into potentially dry subjects. The animal on the cover of Writing Excel Macros with VBA, Second Edition, is a blue jay (Cyanocitta cristata), a vociferous, aggressive bird common in the eastern half of the United States and southern Canada. The blue-crested jay is also an agile flyer and occasional nest-robber. The term "blue jay" is also applied to the Steller's jay (Cyanocitta stelleri), a larger, darker jay common in much of the western U.S. and Canada, as well as several other species.

Blue jays eat primarily nuts, seeds, and insects, sometimes planting acorns in the ground, thus helping tree growth. Known for their loud, harsh, and easily identifiable calls, blue jays (related to crows and ravens) often spoil the hunting forays of other animals by warning potential prey.

Blue jays are bright blue, white, and black, with both sexes similar in appearance. They are about 10 to 12 inches in length, and build large tree nests about 25 feet off the ground, into which are laid 3 to 6 spotted olive-colored eggs. The male is very attentive during the nesting periods. Jays are sociable and frequently travel in groups, ranging from a mating pair to a larger flock. Catherine Morris was the production editor and Tatiana Apandi Diaz was the proofreader for Writing Excel Macros with VBA, Second Edition. Darren Kelly and Claire Cloutier provided quality control. Joe Wizda wrote the index. Interior composition was done by Sarah Sherman and Catherine Morris.

Hanna Dyer designed the cover of this book, based on a series design by Edie Freedman. The cover image is a 19th-century engraving from the Dover Pictorial Archive. Emma Colby produced the cover layout with QuarkXPress 4.1 using Adobe's ITC Garamond font.

David Futato designed the interior layout. This book was converted to FrameMaker 5.5.6 with a format conversion tool created by Erik Ray, Jason McIntosh, Neil Walls, and Mike Sierra that uses Perl and XML technologies. The text font is Linotype Birka; the heading font is Adobe Myriad Condensed; and the code font is LucasFont's TheSans Mono Condensed. The illustrations that appear in the book were produced by Robert Romano and Jessamyn Read using Macromedia FreeHand 9 and Adobe Photoshop 6. The tip and warning icons were drawn by Christopher Bing. This colophon was written by Nancy Kotary.

  • Book cover of Writing Excel Macros with VBA