Module
Contents
Index 🔎︎

# ChDrive Statement

Changes the current drive.

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

## Syntax:

    Dim sText As String

## Paremetre:

Text: Reťazec určujúci názov a cestu priečinka, ktorý chcete odstrániť. Tiež je možné použiť notáciu URL .

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.

## Error codes:

5 Neplatné volanie procedúry

68 Zariadenie nie je dostupné

76 Adresár nenájdený

## Príklad:

    Sub ExampleChDrive
        ChDrive "D" ' Only possible if a drive 'D' exists.
    End Sub