ChDir Statement

Zmení aktuálny priečinok alebo diskovú jednotku.

Warning Icon

This statement currently does not work as documented. See this issue for more information.


Syntax:

ChDir Text As String

Paremetre:

Text: Reťazcový výraz, ktorý určuje cestu nebo jednotku.

Note Icon

Ak chcete zmeniť iba aktuálnu jednotku, zadajte písmeno jednotky a dvojbodku.


Error codes:

5 Neplatné volanie procedúry

76 Adresár nenájdený

PrĂ­klad:

Sub ExampleChDir

Dim sDir1 As String , sDir2 As String

    sDir1 = "c:\Test"

    sDir2 = "d:\Private"

    ChDir( sDir1 )

    MsgBox CurDir

    ChDir( sDir2 )

    MsgBox CurDir

End Sub