Buying Options
Programming Excel with VBA and .NET
Print $54.99
Add to Cart
Print+Ebook $60.49
Add to Cart
Ebook $43.99
Add to Cart
Safari Books Online
Add to Cart
What is this?
Print £42.50
Add to Cart
What is this?
Description
Programming Excel isn't about adding new features as much as it's about combining existing features to solve particular problems. With Visual Basic for Applications (VBA), you can transform Excel into a task-specific piece of software that will quickly and precisely serve your needs. This single-source reference and how-to guide will teach you to use the complete range of Excel programming tasks to solve problems. Developers looking forward to .NET development will also find discussion of how the Excel object model works with .NET tools, including Visual Studio Tools for Office (VSTO).
Full Description
Table of Contents
  1. Learning VBA

    1. Chapter 1 Becoming an Excel Programmer

      1. Why Program?
      2. Record and Read Code
      3. Change Recorded Code
      4. Fix Misteakes
      5. Start and Stop
      6. View Results
      7. Where's My Code?
      8. Macros and Security
      9. Write Bug-Free Code
      10. Navigate Samples and Help
      11. What You've Learned
    2. Chapter 2 Knowing the Basics

      1. Parts of a Program
      2. Classes and Modules
      3. Procedures
      4. Variables
      5. Conditional Statements
      6. Loops
      7. Expressions
      8. Exceptions
      9. What You've Learned
    3. Chapter 3 Tasks in Visual Basic

      1. Types of Tasks
      2. Interact with Users
      3. Do Math
      4. Work with Text
      5. Get Dates and Times
      6. Read and Write Files
      7. Check Results
      8. Find Truth
      9. Compare Bits
      10. Run Other Applications
      11. Control the Compiler
      12. Not Covered Here
      13. What You've Learned
    4. Chapter 4 Using Excel Objects

      1. Objects and Their Members
      2. Get Excel Objects
      3. Get Objects from Collections
      4. About Me and the Active Object
      5. Find the Right Object
      6. Common Members
      7. Respond to Events in Excel
      8. The Global Object
      9. The WorksheetFunction Object
      10. What You've Learned
    5. Chapter 5 Creating Your Own Objects

      1. Modules Versus Classes
      2. Add Methods
      3. Create Properties
      4. Define Enumerations
      5. Raise Events
      6. Collect Objects
      7. Expose Objects
      8. Destroy Objects
      9. Things You Can't Do
      10. What You've Learned
    6. Chapter 6 Writing Code for Use by Others

      1. Types of Applications
      2. The Development Process
      3. Determine Requirements
      4. Design
      5. Implement and Test
      6. Integrate
      7. Test Platforms
      8. Document
      9. Deploy
      10. What You've Learned
      11. Resources
  2. Excel Objects

    1. Chapter 7 Controlling Excel

      1. Perform Tasks
      2. Control Excel Options
      3. Get References
      4. Application Members
      5. AutoCorrect Members
      6. AutoRecover Members
      7. ErrorChecking Members
      8. SpellingOptions Members
      9. Window and Windows Members
      10. Pane and Panes Members
    2. Chapter 8 Opening, Saving, and Sharing Workbooks

      1. Add, Open, Save, and Close
      2. Share Workbooks
      3. Program with Shared Workbooks
      4. Program with Shared Workspaces
      5. Respond to Actions
      6. Workbook and Workbooks Members
      7. RecentFile and RecentFiles Members
    3. Chapter 9 Working with Worksheets and Ranges

      1. Work with Worksheet Objects
      2. Worksheets and Worksheet Members
      3. Sheets Members
      4. Work with Outlines
      5. Outline Members
      6. Work with Ranges
      7. Range Members
      8. Work with Scenario Objects
      9. Scenario and Scenarios Members
      10. Resources
    4. Chapter 10 Linking and Embedding

      1. Add Comments
      2. Use Hyperlinks
      3. Link and Embed Objects
      4. Speak
      5. Comment and Comments Members
      6. Hyperlink and Hyperlinks Members
      7. OleObject and OleObjects Members
      8. OLEFormat Members
      9. Speech Members
      10. UsedObjects Members
    5. Chapter 11 Printing and Publishing

      1. Print and Preview
      2. Control Paging
      3. Change Printer Settings
      4. Filter Ranges
      5. Save and Display Views
      6. Publish to the Web
      7. AutoFilter Members
      8. Filter and Filters Members
      9. CustomView and CustomViews Members
      10. HPageBreak, HPageBreaks, VPageBreak, VPageBreaks Members
      11. PageSetup Members
      12. Graphic Members
      13. PublishObject and PublishObjects Members
      14. WebOptions and DefaultWebOptions Members
    6. Chapter 12 Loading and Manipulating Data

      1. Working with QueryTable Objects
      2. QueryTable and QueryTables Members
      3. Working with Parameter Objects
      4. Parameter Members
      5. Working with ADO and DAO
      6. ADO Objects and Members
      7. DAO Objects and Members
      8. DAO.Database and DAO.Databases Members
      9. DAO.Document and DAO.Documents Members
      10. DAO.QueryDef and DAO.QueryDefs Members
      11. DAO.Recordset and DAO.Recordsets Members
    7. Chapter 13 Analyzing Data with Pivot Tables

      1. Quick Guide to Pivot Tables
      2. Program Pivot Tables
      3. PivotTable and PivotTables Members
      4. PivotCache and PivotCaches Members
      5. PivotField and PivotFields Members
      6. CalculatedFields Members
      7. CalculatedItems Members
      8. PivotCell Members
      9. PivotFormula and PivotFormulas Members
      10. PivotItem and PivotItems Members
      11. PivotItemList Members
      12. PivotLayout Members
      13. CubeField and CubeFields Members
      14. CalculatedMember and CalculatedMembers Members
    8. Chapter 14 Sharing Data Using Lists

      1. Use Lists
      2. ListObject and ListObjects Members
      3. ListRow and ListRows Members
      4. ListColumn and ListColumns Members
      5. ListDataFormat Members
      6. Use the Lists Web Service
      7. Lists Web Service Members
      8. Resources
    9. Chapter 15 Working with XML

      1. Understand XML
      2. Save Workbooks as XML
      3. Use XML Maps
      4. Program with XML Maps
      5. XmlMap and XmlMaps Members
      6. XmlDataBinding Members
      7. XmlNamespace and XmlNamespaces Members
      8. XmlSchema and XmlSchemas Members
      9. Get an XML Map from a List or Range
      10. XPath Members
      11. Resources
    10. Chapter 16 Charting

      1. Navigate Chart Objects
      2. Create Charts Quickly
      3. Embed Charts
      4. Create More Complex Charts
      5. Choose Chart Type
      6. Create Combo Charts
      7. Add Titles and Labels
      8. Plot a Series
      9. Respond to Chart Events
      10. Chart and Charts Members
      11. ChartObject and ChartObjects Members
      12. ChartGroup and ChartGroups Members
      13. SeriesLines Members
      14. Axes and Axis Members
      15. DataTable Members
      16. Series and SeriesCollection Members
      17. Point and Points Members
    11. Chapter 17 Formatting Charts

      1. Format Titles and Labels
      2. Change Backgrounds and Fonts
      3. Add Trendlines
      4. Add Series Lines and Bars
      5. ChartTitle, AxisTitle, and DisplayUnitLabel Members
      6. DataLabel and DataLabels Members
      7. LeaderLines Members
      8. ChartArea Members
      9. ChartFillFormat Members
      10. ChartColorFormat Members
      11. DropLines and HiLoLines Members
      12. DownBars and UpBars Members
      13. ErrorBars Members
      14. Legend Members
      15. LegendEntry and LegendEntries Members
      16. LegendKey Members
      17. Gridlines Members
      18. TickLabels Members
      19. Trendline and Trendlines Members
      20. PlotArea Members
      21. Floor Members
      22. Walls Members
      23. Corners Members
    12. Chapter 18 Drawing Graphics

      1. Draw in Excel
      2. Create Diagrams
      3. Program with Drawing Objects
      4. Program Diagrams
      5. Shape, ShapeRange, and Shapes Members
      6. Adjustments Members
      7. CalloutFormat Members
      8. ColorFormat Members
      9. ConnectorFormat Members
      10. ControlFormat Members
      11. FillFormat Members
      12. FreeFormBuilder
      13. GroupShapes Members
      14. LineFormat Members
      15. LinkFormat Members
      16. PictureFormat Members
      17. ShadowFormat
      18. ShapeNode and ShapeNodes Members
      19. TextFrame
      20. TextEffectFormat
      21. ThreeDFormat
    13. Chapter 19 Adding Menus and Toolbars

      1. About Excel Menus
      2. Build a Top-Level Menu
      3. Create a Menu in Code
      4. Build Context Menus
      5. Build a Toolbar
      6. Create Toolbars in Code
      7. CommandBar and CommandBars Members
      8. CommandBarControl and CommandBarControls Members
      9. CommandBarButton Members
      10. CommandBarComboBox Members
      11. CommandBarPopup Members
    14. Chapter 20 Building Dialog Boxes

      1. Types of Dialogs
      2. Create Data-Entry Forms
      3. Design Your Own Forms
      4. Use Controls on Worksheets
      5. UserForm and Frame Members
      6. Control and Controls Members
      7. Font Members
      8. CheckBox, OptionButton, ToggleButton Members
      9. ComboBox Members
      10. CommandButton Members
      11. Image Members
      12. Label Members
      13. ListBox Members
      14. MultiPage Members
      15. Page Members
      16. ScrollBar and SpinButton Members
      17. TabStrip Members
      18. TextBox and RefEdit Members
    15. Chapter 21 Sending and Receiving Workbooks

      1. Send Mail
      2. Work with Mail Items
      3. Collect Review Comments
      4. Route Workbooks
      5. Read Mail
      6. MsoEnvelope Members
      7. MailItem Members
      8. RoutingSlip Members
  3. Extending Excel

    1. Chapter 22 Building Add-ins

      1. Types of Add-ins
      2. Code-Only Add-ins
      3. Visual Add-ins
      4. Set Add-in Properties
      5. Sign the Add-in
      6. Distribute the Add-in
      7. Work with Add-ins in Code
      8. AddIn and AddIns Members
    2. Chapter 23 Integrating DLLs and COM

      1. Use DLLs
      2. Use COM Applications
    3. Chapter 24 Getting Data from the Web

      1. Perform Web Queries
      2. QueryTable and QueryTables Web Query Members
      3. Use Web Services
      4. Resources
    4. Chapter 25 Programming Excel with .NET

      1. Approaches to Working with .NET
      2. Create .NET Components for Excel
      3. Use .NET Components in Excel
      4. Use Excel as a Component in .NET
      5. Create Excel Applications in .NET
      6. Resources
    5. Chapter 26 Exploring Security in Depth

      1. Security Layers
      2. Understand Windows Security
      3. Password-Protect and Encrypt Workbooks
      4. Program with Passwords and Encryption
      5. Workbook Password and Encryption Members
      6. Excel Password Security
      7. Protect Items in a Workbook
      8. Program with Protection
      9. Workbook Protection Members
      10. Worksheet Protection Members
      11. Chart Protection Members
      12. Protection Members
      13. AllowEditRange and AllowEditRanges Members
      14. UserAccess and UserAccessList Members
      15. Set Workbook Permissions
      16. Program with Permissions
      17. Permission and UserPermission Members
      18. Add Digital Signatures
      19. Set Macro Security
      20. Set ActiveX Control Security
      21. Distribute Security Settings
      22. Using the Anti-Virus API
      23. Common Tasks
      24. Resources
  4. Appendixes

    1. Appendix A Reference Tables

      1. Dialogs Collection Constants
      2. Common Programmatic IDs
    2. Appendix B Version Compatibility

      1. Summary of Version Changes
      2. Macintosh Compatibility
  1. Colophon

View Full Table of Contents
Product Details
Title:
Programming Excel with VBA and .NET
By:
Jeff Webb, Steve Saunders
Publisher:
O'Reilly Media
Formats:
  • Print
  • Ebook
  • Safari Books Online
Print Release:
April 2006
Ebook Release:
June 2009
Pages:
1120
Print ISBN:
978-0-596-00766-9
| ISBN 10:
0-596-00766-3
Ebook ISBN:
978-0-596-15951-1
| ISBN 10:
0-596-15951-X
Customer Reviews
About the Authors
  1. Jeff Webb

    Jeff Webb is one of the original Visual Basic team members. He was intensely involved with Excel VBA and conceived the first Office Developer's Kit. Jeff also wrote the first book on Excel VBA, Using Excel Visual Basic for Applications, which has remained in print for an amazing 12 years. Now, he returns to his favorite subject with a completely new, comprehensive guide: Programming Excel with VBA and VB .NET.

    View Jeff Webb's full profile page.

  2. Steve Saunders

    Steve Saunders is a Microsoft veteren who helped pioneer the design of hypertext help systems that paved the way for the design of today's Web sites. He was lead designer for the award-winning Microsoft Access and Basic help systems, and was a charter member of the Visual Basic product team. Later, Steve wrote documentation for Access programmers and became an Access programmer himself, creating applications for his group at Microsoft and for a growing list of clients outside the company.

    Businesses and non-profit organizations use Steve's affordable custom applications to track their critical information, including customers and orders, lodging reservations, real estate listings, donors and donations. Since 1996, the Methow Valley Sport Trails Association (MVSTA) has used his race management application, Racetracker, to produce accurate and timely results for its popular cross-country ski and running races.

    Before his years at Microsoft, Steve was a reporter and editor for newspapers in Utah, Maine, and Massachusetts, and a technical writer in the database group at Digital Equipment Corp. He holds a master's degree in journalism from Boston University, a graduate certificate in technical writing from Northeastern University, and a bachelor's degree in technical writing and creative writing from Carnegie-Mellon University.

    Currently a principal of Smiling Country, Steve enjoys combining his technical, design, and editorial expertise to help businesses succeed.

    View Steve Saunders's full profile page.

Colophon

The animal on the cover of Programming Excel with VBA and .NET is a shoveler duck (Anas clypeata). Native to North America and much of the northern terrain of Europe and Asia, shovelers are easily distinguished from other breeds of duck by their oblong, spoon-shaped bills. Shoveler ducks are also characterized by their sexual dimorphism; the male of the species has more ostentatious coloring, with a lustrous green head, neck, and speculum, whereas the shoveler female is tinted in a more subdued palette of browns, grays, and blacks. Both genders have light-blue forewing feathers, visible only when the birds are in flight.

Shoveler ducks subsist in the open wetlands on a diet that consists largely of particles of plant and animal matter, including seeds, leaves, stems, mollusks, and insects. They feed by drawing water into their large spatulate bills, which are covered by approximately 110 teethlike projections called lamellae that filter out food for consumption.

Breeding season for shovelers typically runs from April to June. The female builds her nest on dry land, twirling her body on the ground to dig out a cup-shaped hole, which she lines with grass and feathers. She lays anywhere from 8 to 12 olive-colored eggs, which incubate for up to 25 days. During this time, the shoveler female is extremely protective of her offspring; if forced off her nest, she will frequently defecate on her eggs, a maneuver believed to discourage predation.

The cover image is from the Dover Pictorial Archive. The cover font is Adobe ITC Garamond. The text font is Linotype Birka; the heading font is Adobe Myriad Condensed; and the code font is LucasFont's TheSans Mono Condensed.

  • Book cover of Programming Excel with VBA and .NET