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!