July 2019
Beginner to intermediate
944 pages
27h 45m
English
In Chapter 9, “Using Built-In Functions,” you learned how to use VBA's built-in functions. In this chapter, you'll learn how, and when, to create your own functions.
You create a function the same way you create a subprocedure: by typing code into the Code window. (You can't record a function in Excel or Word—the applications that include a Macro Recorder. Instead, you have to write functions yourself because the Recorder creates only subprocedures.)
It's important to recall that, although both are technically called procedures, in VBA functions differ from subs. The primary difference is that functions interact more with other procedures. Functions accept arguments (incoming data) from the procedure ...