◆パスを取得する
特別なフォルダや開いているブックのパスを取得できます。
Sub test1()
Dim Current_path As String
Dim DefaultFile_path As String
Dim Excel_path As String
Dim Startup_path As String
Dim Templates_path As String
Dim Library_path As String
Dim UserLibrary_path As String
Dim Workbook_path As String
Dim Thisbook_path As String
Current_path = CurDir
DefaultFile_path = Application.DefaultFilePath
Excel_path = Application.Path
Startup_path = Application.StartupPath
Templates_path = Application.TemplatesPath
Library_path = Application.LibraryPath
UserLibrary_path = Application.UserLibraryPath
Workbook_path = ActiveWorkbook.Path
Workbook_path = ActiveWorkbook.FullName
Thisbook_path = ThisWorkbook.Path
Thisbook_path = ThisWorkbook.FullName
End Sub