Modul
Isi
Indeks 🔎︎

# ChDrive Statement

Merubah drive saat ini.

This statement currently does not work as documented. See this issue for more information.

## Sintaksis:

    ChDrive Teks As String

## Parameter:

Text: Any string expression that contains the drive letter of the new drive. If you want, you can use URL notation.

The drive must be assigned a capital letter. Under Windows, the letter that you assign the drive is restricted by the settings in LASTDRV. If the drive argument is a multiple-character string, only the first letter is relevant. If you attempt to access a non-existent drive, an error occurs that you can respond to with the OnError statement.

## Kode kesalahan:

5 Tidak sah dalam pemanggilan prosedur

68 Perangkat tidak tersedia

76 Jalur tidak ketemu

## Contoh:

    Sub ExampleChDrive

        ChDrive "D" ' Only possible if a drive 'D' exists.

    End Sub