Chapter 9: VBA Programming Examples and Techniques
In This Chapter
• Using VBA to work with ranges
• Using VBA to work with workbooks and sheets
• Creating custom functions for use in your VBA procedures and in worksheet formulas
• Trying miscellaneous VBA tricks and techniques
• Using Windows Application Programming Interface (API) functions
Learning by Example
I believe that learning programming concepts is accelerated by a heavy emphasis on examples. And based on the feedback that I've received from readers of previous editions of this book, I have plenty of company. VBA programmers especially benefit from a hands-on approach. A well-thought-out example usually communicates a concept much better than a description of the underlying theory. I decided, therefore, not to write a reference book that painstakingly describes every nuance of VBA. Rather, I prepared numerous examples to demonstrate useful Excel programming techniques.
The previous chapters in this part provide enough information to get you started. The Help system provides all the details that I left out. In this chapter, I pick up the pace and present examples that solve practical problems while furthering your knowledge of VBA.