Using Built‐In Functions
Richard Mansfield · 2019
This chapter helps VB developers to understand what functions are and what they do, use functions, use key visual basic for application (VBA) functions, convert data from one type to another and manipulate strings and dates. A function, like a subroutine, is a type of procedure. In the Beginner's All-Purpose Symbolic Instruction Code language, a function differs from a sub in that a function always returns a value. VBA provides a full set of simple functions for converting data from one data type to another. Asc tells VB developers which numeric value has been assigned to a particular letter according to the ANSI character code that is used in Windows. A character code is a list of numbers by which computers refer to letters of the alphabet. The Format function is a powerful tool for changing numbers, dates and times, and strings into a format that VB developers prefer.