hello
I'm so confused about this error in this line
Me.Controls("ComboBox" & i).List = .Offset(, i - 1).Value
"could not set the list property.invalid property array index" .the problem doesn't always occures when run the useform.
in normal case works well when I run the userform, suddenly today when run userform it shows the error . how can I fix it forever ,please
this the code occures problem
Private Sub UserForm_Initialize()
With Sheets("DATA")
With .Range("A2", .Cells(.Rows.Count, "A").End(xlUp))
For i = 1 To 4
Me.Controls("ComboBox" & i).List = .Offset(, i - 1).Value
Me.Controls("ComboBox" & i + 4).List = .Offset(, i - 1).Value
Me.Controls("ComboBox" & i + 8).List = .Offset(, i - 1).Value
Me.Controls("ComboBox" & i + 12).List = .Offset(, i - 1).Value
Me.Controls("ComboBox" & i + 16).List = .Offset(, i - 1).Value
Me.Controls("ComboBox" & i + 20).List = .Offset(, i - 1).Value
Me.Controls("ComboBox" & i + 24).List = .Offset(, i - 1).Value
Me.Controls("ComboBox" & i + 28).List = .Offset(, i - 1).Value
Me.Controls("ComboBox" & i + 32).List = .Offset(, i - 1).Value
Me.Controls("ComboBox" & i + 36).List = .Offset(, i - 1).Value
Me.Controls("ComboBox" & i + 40).List = .Offset(, i - 1).Value
Me.Controls("ComboBox" & i + 44).List = .Offset(, i - 1).Value
Next
End With
End With
I hope to find solution for this dilemma