Instruci贸n ChDrive

Modifica a unidade de disco 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.


Sintaxe:


  ChDrive Text As String

Par谩metros:

Text: Any string expression that contains the drive letter of the new drive. If you want, you can use URL notation.

A unidade debe ter unha letra mai煤scula. En Windows, a letra atribu铆da 谩 unidade est谩 restrinxida pola configuraci贸n de LASTDRV. Se o argumento da unidade 茅 unha cadea de varios caracteres, s贸 茅 relevante a primeira letra. Se tenta acceder a unha unidade inexistente, prod煤cese un erro ao cal pode responder coa instruci贸n OnError.

C贸digos de erro

5 Chamada de procedemento incorrecta

68 Dispositivo non dispo帽铆bel

76 Ruta non atopada

Exemplo:


  Sub ExampleChDrive
      ChDrive "D" REM S贸 茅 pos铆bel se existe unha unidade 'D'
  End Sub

Precisamos da s煤a axuda!