fn = ActiveWorkbook.FullName ' ブックのフル名称を取得
POS = InStrRev(fn, "\") ' fnのうしろから \ を探す
curpath = Mid(fn, 1, POS) ' 先頭から \ の位置までを取り出す