Search the Community
Showing results for tags 'combobox'.
-
Hi to all, it seem very simple but I'm no able to solve this issue: I want to populate a ComboBox by the data incoming from a multidimensional array (4 columns by n rows) created by results of selecting block attributes inside a drawing. Private Sub UserForm_Activate() Set oBlock = ThisDrawing.ActiveLayout.Block I = 0 ReDim Preserve MyArr(3, I) MyArr(0, I) = "GS_INTCODE" MyArr(1, I) = "GS_Origine X" MyArr(2, I) = "GS_Origine Y" MyArr(3, I) = "GS_Origine Z" CercaCodiceGLASS.ListaCodiciGlass.List = MyArr I = 1 For ICount = 0 To oBlock.Count - 1 Set oEnt = oBlock.Item(ICount) If TypeOf oEnt Is McadPartReference Then Set oblkRef = oEnt DATA = oblkRef.DATA For IntCode = LBound(DATA) To UBound(DATA) If DATA(IntCode, 0) = "INTERNAL_CODE" Then GS_INTCODE = DATA(IntCode, 1) GS_Origine = oblkRef.Origin ReDim Preserve MyArr(3, I) MyArr(0, I) = GS_INTCODE MyArr(1, I) = GS_Origine(0) MyArr(2, I) = GS_Origine(1) MyArr(3, I) = GS_Origine(2) I = I + 1 End If Next IntCode End If Next ICount With ListaCodiciGlass .Clear .List() = MyArr End With CercaCodiceGLASS.ListaCodiciGlass.ListIndex = 1 End Sub CercaCodiceGLASS it's the userformName ListaCodiciGlass it's the name of combobox to popolate. Combobox it's composed by four columns. The result is the polulation of combobox with just few data instead all data inside the array that are hundred (see picuture below) As second issue I'm not able to insert combobox column header. If you look at the picture seems there is a row header not a columns header. Thank you everybody for support.