Function ZatvoriF(ImeFoldera As String) Dim Sel Dim ApiSel Set Sel = CreateObject("shell.application") For Each ApiSel In Sel.Windows If ApiSel.Document.folder.self.Path = ImeFoldera Then ApiSel.Quit Next End Function