ChDir Statement

Changes the current directory or drive.

Warning Icon

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


தொடரமைப்பு:

ChDir Text As String

அளவுருக்கள்:

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

Note Icon

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


பிழையான குறியீடுகள்:

5 செல்லாத செயல்முறை அழைப்பு

76 பாதை கிடைக்கவில்லை

எடுத்துக்காட்டு:

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