Application VisualBasic Script

Public Sub FindCodeObject()
  Dim component As VBIDE.VBComponent
  Set component = Workbooks("Book1.xls").VBProject.VBComponents(Workbooks("Book1.xls").CodeName)
  Debug.Print component.Name
End Sub