ChDir 変更後のパス
でも変更できるが、変更先が別のドライブだったり、ネットワーク上だったりすると上手くいかない。そういう時は↓の方法で。
例:カレントディレクトリをネットワーク上にあるxlファイルの場所に変更したい場合
Public Declare PtrSafe Function SetCurrentDirectoryA Lib "kernel32" (ByVal lpPathName As String) As Long
Sub change_directory()
Debug.Print "変更前: " & CurDir
SetCurrentDirectoryA ThisWorkbook.Path
Debug.Print "変更後: " & CurDir
End Sub