if object is never loaded then you cannot unload at the beginning of your sub/function

vb Code:
  1. On Error Resume Next
if object is not loaded it will skip