ChDrive Statement

ā¤ĩā¤°āĨā¤¤ā¤Žā¤žā¤¨ ā¤ĄāĨā¤°ā¤žā¤‡ā¤ĩ ā¤Ŧā¤Ļā¤˛ā¤¤ā¤ž ā¤šāĨˆ.

Warning Icon

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


Syntax:


ChDrive Text As String

ā¤ĒāĨˆā¤°ā¤žā¤ŽāĨ€ā¤Ÿā¤°

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.

Error codes:

5 Invalid procedure call

68 Device not available

D'oh! You found a bug (text/sbasic/shared/00000003.xhp#err76 not found).

ā¤‰ā¤Ļā¤žā¤šā¤°ā¤Ŗ:


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

Please support us!