Collabora Office 21.06 Help
變更目前目錄或磁碟機。
This statement currently does not work as documented. See this issue for more information.
ChDir Text As String
Text:用於指定目錄路徑或磁碟機的任意字串型表示式。
如果您僅是要變更目前磁碟機,請輸入磁碟機號,並在後面加上冒號。
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