ChDrive Statement

Camuda la unidá actual.

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.


Syntax:


  ChDrive Text As String

Parameters:

Testu: Cualquier espresión de cadena que contenga la lletra de la unidá nueva. Si deseyar, pue usase la notación URL.

La unidá tien de tener asignada una lletra mayúscula. En Windows, la lletra que s'asigna a la unidá ta acutada pol valor de LASTDRV. Si l'argumentu d'unidá ye una cadena de dellos caráuteres, namái ye relevante la primer lletra. Si inténtase aportar a una unidá non esistente, produzse un fallu al que pue respondese cola instrucción OnError.

Error codes:

5 Llamada a procedimientu non válida

68 Preséu non disponible

76 Nun s'alcontró'l camín

Example:


  Sub ExampleChDrive
      ChDrive "D" ' Namái ye posible si'l preséu 'D' esiste.
  End Sub

Please support us!