HAPPY BOOKSGIVING
Use code BOOKSGIVING during checkout to save 40%-55% on books and eBooks. Shop now.
Rough Cuts are manuscripts that are developed but not yet published, available through Safari. Rough Cuts provide you access to the very latest information on a given topic and offer you the opportunity to interact with the author to influence the final publication.
This is a working draft of a pre-release book. It is available before the published date as part of the Rough Cuts service.
“As Excel applications become more complex and the Windows development platform more powerful, Excel developers need books like this to help them evolve their solutions to the next level of sophistication. Professional Excel Development is a book for developers who want to build powerful, state-of-the-art Excel applications using the latest Microsoft technologies.”
–Gabhan Berry, Program Manager, Excel Programmability, Microsoft
“The first edition of Professional Excel Development is my most-consulted and most-recommended book on Office development. The second edition expands both the depth and range. It shines because it takes every issue one step further than you expect. The book relies on the authors’ current, real-world experience to cover not only how a feature works, but also the practical implications of using it in professional work.”
–Shauna Kelly, Director, Thendara Green
“This book illustrates techniques that will result in well-designed, robust, and maintainable Excel-based applications. The authors’ advice comes from decades of solid experience of designing and building applications. The practicality of the methods is well illustrated by the example timesheet application that is developed step-by-step through the book. Every serious Excel developer should read this and learn from it. I did.”
–Bill Manville, Application Developer, Bill Manville Associates
The Start-to-Finish Guide to Building State-of-the-Art Solutions with Excel 2007
In this book, four world-class Microsoft® Excel developers offer start-to-finish guidance for building powerful, robust, and secure applications with Excel. The authors—three of whom have been honored by Microsoft as Excel Most Valuable Professionals (MVPs)—show how to consistently make the right design decisions and make the most of Excel’s most powerful new features. Using their techniques,you can reduce development costs, time to market, and hassle—and build more effective, successful solutions.
Fully updated for Excel 2007, this book starts where other books on Excel programming leave off. Through a hands-on case study project, you’ll discover best practices for planning, architecting, and building Excel applications that are robust, secure, easy to maintain, and highly usable. If you’re a working developer, no other book on Excel programming offers you this much depth, insight, or value.
• Design worksheets that will be more useful and reliable
• Leverage built-in and application-specific add-ins
• Construct applications that behave like independent Windows programs
• Make the most of the new Ribbon user interface
• Create cross-version applications that work with legacy versions of Excel
• Utilize XML within Excel applications
• Understand and use Windows API calls
• M
Acknowledgments . . . xiv
About the Authors . . . xv
Chapter 1 Introduction
About This Book . . . 1
Who Should Read This Book . . . 2
Excel Developer Categories . . . 2
Excel as an Application Development Platform . . . 4
Structure . . . 7
Examples . . . 8
Supported Versions of Excel . . . 9
Typefaces . . . 10
On the CD . . . 10
Help and Support . . . 11
The Professional Excel Development Web Site . . . 12
Feedback . . . 12
Chapter 2 Application Architectures
Concepts . . . 13
Chapter 3 Excel and VBA Development Best Practices
Naming Conventions . . . 27
Best Practices for Application Structure and Organization . . . 40
General Application Development Best Practices . . . 45
Chapter 4 Worksheet Design
Principles of Good Worksheet UI Design . . . 69
Program Rows and Columns: The Fundamental UI Design Technique . . . 70
Defined Names . . . 71
Styles . . . 78
User Interface Drawing Techniques . . . 83
Data Validation . . . 88
Conditional Formatting . . . 92
Using Controls on Worksheets . . . 98
Practical Example . . . 100
Chapter 5 Function, General, and Application-Specific Add-ins
The Four Stages of an Application . . . 107
Function Library Add-ins . . . 110
General Add-ins . . . 117
Application-Specific Add-ins . . . 118
Practical Example . . . 125
Chapter 6 Dictator Applications
Structure of a Dictator Application . . . 141
Practical Example . . . 157
Chapter 7 Using Class Modules to Create Objects
Creating Objects . . . 166
Creating a Collection . . . 170
Trapping Events . . . 177
Raising Events . . . 180
Practical Example . . . 188
Chapter 8 Advanced Command Bar Handling
Command Bar Design . . . 198
Table-Driven Command Bars . . . 199
Putting It All Together . . . 219
Loading Custom Icons from Files . . . 228
Hooking Command Bar Control Events . . . 232
Practical Example . . . 241
Chapter 9 Introduction to XML
XML . . . 249
Chapter 10 The Office 2007 Ribbon User Interface
The RibbonX Paradigm . . . 273
An Introduction to the Office 2007 Open XML File Format . . . 274
Ribbon Design and Coding Best Practices . . . 278
Table-Driven Ribbon UI Customization . . . 289
Advanced Problem Solving . . . 291
Further Reading . . . 300
Related