Hi i've copy/pasted the code from a TheEngineer-answer - I have slightly modified the code, so it collects data from an array instead of a worksheet. I keep getting RuneTime Error 424, and when I read MS help on Error 424 it says I should enable Microsoft DAO 3.5 Object Library my Excel only have 3.6. I guess newer version? But I am still getting an error. Can someone help me??
This is the code:
Option Explicit
Private Sub UserForm_Initialize()
Dim LastColumn As Long
Dim i As Long
Dim chkBox As MSForms.CheckBox
Call test ' Here i run array code (The array is filled with data)
TestArr = UniqueProvisionArray
LastColumn = UBound(TestArr)
For i = 0 To LastColumn
Set chkBox = Me.Controls.Add("Forms.CheckBox.1", "CheckBox_" & i)
chkBox.Caption = TestArr(i).Value
chkBox.Left = 5
chkBox.Top = 5 + ((i - 1) * 20)
Next i
End Sub