
カレントディレクトリを取得するマクロです。
カレントディレクトリは、ファイルを開くダイアログボックスなどでフォルダを開くと、そのフォルダがカレントディレクトリとして設定されます。
例
Sub GetCurrentDirectory() MsgBox "カレントディレクトリ:" & CurDir End Sub
実行結果

comments powered by Disqus
スポンサーリンク
2017年6月12日 (月) 22:36 in Excel , VBA
Sub GetCurrentDirectory() MsgBox "カレントディレクトリ:" & CurDir End Sub
スポンサーリンク