Book description
Finally, there's a book that treats Excel as the powerful development platform it really is, and covers every facet of developing commercial-quality Excel applications.
This is not a book for beginners. Writing for professional developers and true Excel experts, the authors share insider's knowledge they've acquired building Excel applications for many of the world's largest companies—including Microsoft. Professional Excel Development demonstrates how to get the utmost from Excel, addressing everything from application architectures through worksheet and userform design, charting, debugging, error handling and optimizing performance. Along the way, the authors offer best practices for every type of Excel development, from building add-ins through interacting with XML Web services. Coverage includes
Building add-ins to provide new Excel functions
Designing effective worksheets, userforms and other user interface elements
Leveraging Excel's powerful data analysis features
Creating sophisticated custom charts
Handling errors, debugging applications and optimizing performance
Using class modules and interfaces to create custom objects
Understanding Windows API calls: when to use them, and how to modify them
Adding worksheet functions with
C-based XLLs
Programming with databases
Controlling external applications from Excel
Integrating with Visual Basic 6, VB.NET and Visual Studio Tools for Office
Using XML to import and export data and communicate with Web services
Providing help, securing, packaging and distributing
The accompanying CD-ROM contains the book's sample timesheet application at every stage of construction, with detailed code comments. It also includes many examples of the concepts introduced in each chapter and a collection of the authors' Excel development utilities.
© Copyright Pearson Education. All rights reserved.
Table of contents
- Copyright
- Praise for Professional Excel Development
- Acknowledgments
- About the Authors
- 1. Introduction
- 2. Application Architectures
-
3. Excel and VBA Development Best Practices
- Naming Conventions
- Best Practices for Application Structure and Organization
-
General Application Development Best Practices
- Code Commenting
- Code Readability
-
VBA Programming Best Practices
- General VBA Best Practices
-
Defensive Coding
- Write Your Application in the Earliest Version of Excel That You Expect It to Run In
- Explicitly Use ByRef or ByVal
- Explicitly Call the Default Property of an Object
- Validate Arguments Before Using Them in Procedures
- Use Guard Counters to Protect Against Infinite Loops
- Use Debug > Compile Early and Often
- Use CodeNames to Reference Sheet Objects
- Validate the Data Types of Selections
- Change Control
- Conclusion
- 4. Worksheet Design
-
5. Function, General and Application-Specific Add-ins
- The Four Stages of an Application
- Function Library Add-ins
- General Add-ins
- Application-Specific Add-ins
-
Practical Example
-
Features
- Open and Initialize the Application
- Build a Toolbar That Gives the User Access to Each Feature
- Open and Initialize the Time-Entry Workbook
- Save a Copy of the Time-Entry Workbook to a Predefined Consolidation Location
- Allow the User to Add More Data-Entry Rows to the Time-Entry Worksheet
- Allow the User to Clear the Data-Entry Area So the Timesheet Can Be Reused
- Allow the User to Close the PETRAS Application
- Add a Custom Property to Allow the Consolidation Application to Locate All Instances of Our Time-Entry Workbook
- Application Organization
-
Features
- Conclusion
- 6. Dictator Applications
- 7. Using Class Modules to Create Objects
- 8. Advanced Command Bar Handling
- 9. Understanding and Using Windows API Calls
- 10. Userform Design and Best Practices
- 11. Interfaces
- 12. VBA Error Handling
-
13. Programming with Databases
- An Introduction to Databases
- Designing the Data Access Tier
- Data Access with SQL and ADO
- Further Reading
- Practical Example
- Conclusion
- 14. Data Manipulation Techniques
- 15. Advanced Charting Techniques
-
16. VBA Debugging
- Basic VBA Debugging Techniques
- The Immediate Window (Ctrl+G)
- The Call Stack (Ctrl+L)
- The Watch Window
- The Locals Window
- The Object Browser (F2)
- Creating and Running a Test Harness
- Using Assertions
- Debugging Shortcut Keys that Every Developer Should Know
- Conclusion
-
17. Optimizing VBA Performance
- Measuring Performance
- The PerfMon Utility
- Creative Thinking
- Macro-Optimization
-
Micro-Optimization
-
VBA
- Use Matching Data Types
- Perform Explicit Conversions Instead of Implicit Ones
- Use Len(string)=0 Instead of string=””
- Use Left$, Right$, Mid$ and So Forth Instead of Left, Right and Mid
- Pass Strings and Variant Arrays ByRef Instead of ByVal
- Don't Use Option Compare Text
- Use Early Binding Wherever Possible
- Use Integer Arithmetic Where Possible
- Use For Each to Iterate Collections (Not by Index)
- Use For … Next to Iterate Arrays (Not For Each)
- Use Dictionaries Instead of Collections (If Order Isn't Important)
- Don't Use If bVariable = True Then, Just Use If bVariable Then
- Don't Use IIf()
- Use Multiple If…ElseIf…End If Instead of Select Case
- Use With blocks and Object Variables to Reduce the Dots
- Excel
-
VBA
- Conclusion
- 18. Controlling Other Office Applications
-
19. XLLs and the C API
- Why Create an XLL-Based Worksheet Function
- Creating an XLL Project in Visual Studio
- The Structure of an XLL
- The XLOPER and OPER Data Types
- The Excel4 Function
- Commonly Used C API Functions
- XLOPERs and Memory Management
- Registering and Unregistering Custom Worksheet Functions
- Sample Application Function
- Debugging the Worksheet Functions
- Miscellaneous Topics
- Additional Resources
- Conclusion
- 20. Combining Excel and Visual Basic 6
- 21. Writing Add-ins with Visual Basic 6
- 22. Using VB.NET and the Visual Studio Tools for Office
- 23. Excel, XML and Web Services
- 24. Providing Help, Securing, Packaging and Distributing
- Where are the Companion Content Files?
Product information
- Title: Professional Excel Development: The Definitive Guide to Developing Applications Using Microsoft® Excel and VBA®
- Author(s):
- Release date: February 2005
- Publisher(s): Addison-Wesley Professional
- ISBN: 0321262506
You might also like
book
Learn Data Mining Through Excel: A Step-by-Step Approach for Understanding Machine Learning Methods
Use popular data mining techniques in Microsoft Excel to better understand machine learning methods. Software tools …
video
Introduction to ChatGPT and OpenAI
OpenAI ChatGPT is a powerful language model that uses advanced ML techniques to generate human-like text …
audiobook
Speak with Confidence
In Speak with Confidence: Overcome Self-Doubt, Communicate Clearly, and Inspire Your Audience, keynote speaker, author, and …
audiobook
Algorithms
Digital technology runs on algorithms, sets of instructions that describe how to do something efficiently. Application …