Returning the Active Window, Inspector, or Explorer
'Displays a message box that states which window type is active, as long as there is an active window: Sub state() If Not TypeName(ActiveWindow) = "Nothing" Then
MsgBox "An " & TypeName(ActiveWindow) & " window is active." End If End Sub