Is there any way to close a Project Explorer window with a shortcut or is there an option to write a Subroutine closing this window?
CodePudding user response:
You can use a routine like this:
Sub ClosePE_Window()
Dim w As Object
For Each w In Application.VBE.Windows
If LCase$(Left$(w.Caption, 10)) = "project - " Then
w.Close
Exit For
End If
Next w
End Sub