Chapter 22: Introducing VBA


This chapter introduces you to Visual Basic for Applications (VBA). VBA is Excel's programming language, and it is used to create custom worksheet functions. Before you can create custom functions by using VBA, you need to have some basic background knowledge of VBA as well as some familiarity with the Visual Basic Editor.

About VBA

VBA is best thought of as Microsoft's common application scripting language. VBA is included with most Office 2007 applications, and it's also available in applications from other vendors. In Excel, VBA has two primary uses:

  • Automating spreadsheet tasks

  • Creating custom functions that you can use in your worksheet formulas

Note 

Excel also includes another way of creating custom functions by using the XLM macro language. XLM is pretty much obsolete, but it is still supported for compatibility purposes. This book completely ignores the XLM language and focuses on VBA. By the way, the XLM macro language has absolutely nothing to with XML, which is a mark-up language for storing structured data.

VBA is a complex topic-far too complex to be covered completely in this book. Because this book deals with formulas, I hone in on one important (and useful) aspect of VBA-creating custom worksheet functions. You can use a custom worksheet function (sometimes known as a user-defined function) in formulas.

Note 

If your goal is to become a VBA expert, this book nudges you in that direction, but it does not get you to your final destination. You may want to check out another book of mine: Excel 2007 Power Programming with VBA (Wiley). That book covers all aspects of VBA programming for Excel.




Excel 2007 Formulas
Excel 2007 Formulas (Mr. Spreadsheets Bookshelf)
ISBN: 0470044020
EAN: 2147483647
Year: 2007
Pages: 212

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net