Adding Tree list in list box in catia vba

74 Views Asked by At

I'm trying to add tree items in a list box in Catia. I tried with this code. But it's showing an error.

Private Sub UserForm_Initialize()

  For N = 1 To CATIA.Document.Count

    Set Dokument = CATIA.Document.Item(N)

    For i = 2 To Dokument.Product.Products.Count

      Set InstDokument = Dokument.Product.Products.Item(i)

      UserForm15.ListBox11234.AddItem InstDokument.Name

    Next

  Next

End Sub 

Error: Run time error '438': Object doesn't support this property or method.

0

There are 0 best solutions below