Chapter 9

Using Functions

VBA comes with a large number of built-in functions to perform commonly needed operations — everything from determining whether a file exists, to returning the current date, to converting data from one format to another. (For example, you can use a function to convert numeric data into a text string.) This chapter shows you what functions are and what they do, and shows you how to use functions. Along the way, you’ll meet some of the key functions that VBA provides, including functions for converting data from one data type to another, file-operation functions, date functions, and mathematical functions.

You can also create custom functions of your own to supplement VBA’s functions. The next chapter tells you how to ...

Get Mastering VBA for Microsoft Office 2007, 2nd Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.