Sub active() If TypeName(Application.ActiveInspector) = "Nothing" Then MsgBox "No item is open." End End If End Sub