CHDIR(directory) This function attempts to change to the named directory, and returns an error code. The code is zero if no error occurred, otherwise the message corresponding to the code can be obtained with the ERRORTEXT function by first adding 100 to the number.