Function ParentDirName() As String With ThisWorkbook ParentDirName = Left(.Path, InStrRev(.Path, "\") - 1) End With End Function
Function ParentDirName() As String With ThisWorkbook ParentDirName = Left(.Path, InStrRev(.Path, "\") - 1) End With End Function