ChDrive İfadesi

Mevcut sürücüyü değiştirir.

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özdizimi:


  ChDrive Text As String

Parametreler:

Metin: Yeni sürücünün sürücü harfini içeren herhangi bir karakter dizisi ifadesidir. İsterseniz URL yazımı kullanabilirsiniz.

Sürücüye büyük harf atanmalıdır. Windows'ta sürücüye atayacağınız harfler LASTDRV'deki ayarlarla sınırlanmaktadır. Sürücü değişkeni çok karakterli bir metin ise yalnız ilk harf önemlidir. Varolmayan bir sürücüye erişmek isterseniz OnError ifadesi ile yanıt verebileceğiniz bir hata ortaya çıkar.

Hata kodları:

5 Geçersiz yordam çağrısı

68 Aygıt kullanılabilir değil

76 Yol bulunamadı

Örnek:


  Sub ExampleChDrive
      ChDrive "D" REM Sadece 'D' sürücüsü varsa mümkün.
  End Sub

Lütfen bizi destekleyin!