ChDir Statement

Changes the current directory or drive.

Advarselsikon

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


Syntaks


ChDir Text As String

Parameter

Text: Any string expression that specifies the directory path or drive.

Merknadsikon

If you only want to change the current drive, enter the drive letter followed by a colon.


Feilkoder

5 Ugyldig prosedyreoppkall

76 Fann ikke stien

Eksempel:


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

Supporter oss!