9.1. What Is a Function?9.2. Using Functions9.2.1. Passing Arguments to a Function9.3. Using Functions to Convert Data from One Type to Another9.3.1. Using the Asc Function to Return a Character Code9.3.2. Using the Val Function to Extract a Number from the Start of a String9.3.3. Using the Str Function to Convert a Value to a String9.3.4. Using the Format Function to Format an Expression9.3.4.1. Using Predefined Numeric Formats9.3.4.2. Creating a Numeric Format9.3.4.3. Creating a Date or Time Format9.3.4.4. Creating a String Format9.3.5. Using the Chr Function and Constants to Enter Special Characters in a String9.4. Using Functions to Manipulate Strings9.4.1. Using the Left, Right, and Mid Functions to Return Part of a String9.4.1.1. Using the Left Function9.4.1.2. Using the Right Function9.4.1.3. Using the Mid Function9.4.2. Using InStr and InStrRev to Find a String within Another String9.4.3. Using LTrim, RTrim, and Trim to Trim Spaces from a String9.4.4. Using Len to Check the Length of a String9.4.5. Using StrConv, LCase, and UCase to Change the Case of a String9.4.5.1. Using StrConv9.4.5.2. Using LCase and UCase9.4.6. Using the StrComp Function to Compare Apples to Apples9.5. Using VBA's Mathematical Functions9.6. Using VBA's Date and Time Functions9.6.1. Using the DatePart Function to Parse Dates9.6.2. Using the DateDiff Function to Return an Interval9.6.3. Using the DateAdd Function to Add to a Date9.7. Using File-Management Functions9.7.1. Using the Dir Function to Check Whether a File Exists9.7.2. Returning the Current Path9.8. The Bottom Line