Chapter 9Using Built-In Functions

VBA comes with a large number of built-in functions that perform commonly needed operations—everything from determining whether a file exists to returning the current date and converting data from one format to another. (For example, you can use a function to convert numeric data into a text string.)

In this book, I generically refer to most VBA language components (VBA's diction) as commands. But in this chapter, though, we'll call them functions. Other names that are sometimes used—more or less accurately—for these built-in commands include: operations, methods (with objects), routines, procedures, and stored procedures.

This chapter demonstrates what functions are, what they do, and how to use them. Along ...

Get Mastering VBA for Microsoft Office 2016 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.