ChDrive lause

Vahetab aktiivset ketast.

warning

Some DOS-specific file and directory functions are no longer provided in LibreOffice, or their function is only limited. For example, support for the ChDir, ChDrive and CurDir functions is not provided. Some DOS-specific properties are no longer used in functions that expect file properties as parameters (for example, to differentiate from concealed files and system files). This ensures the greatest possible level of platform independence for LibreOffice. Therefore this feature is subject to removal in a future release.


note

The ScriptForge library in LibreOffice 7.1 introduces the FileSystem service with methods to handle files and folders in user scripts.


SĂĽntaks:


  ChDrive Text As String

Parameetrid:

Text: uue ketta kettatähist sisaldav suvaline stringavaldis. Soovi korral saab kasutada ka URL-i tähistust.

Kettale tuleb omistada suurtäht. Windowsis on kettale omistatav täht piiratud LASTDRV sätetega. Kui ketta argument on mitmemärgiline string, siis on asjakohane ainult esimene täht. Kui proovid juurde pääseda kettale, mida pole olemas, ilmneb viga, mida saad hallata lause OnError abil.

Veakoodid:

5 Vigane protseduuri väljakutse

68 Seade ei ole kättesaadav

76 Asukohta ei leitud

Näide:


  Sub ExampleChDrive
      ChDrive "D" REM Võimalik ainult siis, kui 'D'-seade on olemas
  End Sub

Palun toeta meid!