Excel ChDrive Function (VBA)
-function/chdrive-function-vba-code.jpg)
How to use the ChDrive Function (VBA)
This Excel tutorial explains how to use the Excel ChDrive function with syntax and examples using VBA.
SUMMARY:
The Excel VBA ChDrive function allows you to change the current drive.
PURPOSE:
To changes the current drive.
RETURN VALUE:
The ChDrive function does not return any value, but rather changes the current drive.
SYNTAX:
ChDrive drive
ARGUMENTS:
The ChDrive function syntax has the following arguments:
- drive: Required. The drive argument is a string expression that specifies an existing drive.
- If "drive" is left blank, then the current drive is not changed.
- If the drive argument is a multiple-character string, ChDrive uses only the first letter.
REMARKS:
- The ChDrive function changes only the current drive. Use the ChDrive function to change the current drive.