To all experts in VBA,
Can help to find what wrongs with my code ??? keep giving me run time error 9. What is the solutions to prevent this kind of things to happen again ??
I'm trying populate each of the textbox base on the individuals index selected in the listbox. however, when i selected the sixth index it shows error.. i dun knw what wrongs with the code.
Thank in advance and appreciated your helps.
I couldnt upload images its because i dun have 10 countpost.
Table and fields
field5
f,g,h,t,y,I
field6
1,2,3,4,5
field7
1,2,3,4,5,6
field8
1,2,3,4,5,6
field9
1,2,3,4,5,6
field10
1,2,3,4,5,6
field11
1,2,3,4,5,6
I'm using this code to populate the value base on rowsource of the combo box and sameindex as the listbox
Can help to find what wrongs with my code ??? keep giving me run time error 9. What is the solutions to prevent this kind of things to happen again ??
I'm trying populate each of the textbox base on the individuals index selected in the listbox. however, when i selected the sixth index it shows error.. i dun knw what wrongs with the code.
Thank in advance and appreciated your helps.
I couldnt upload images its because i dun have 10 countpost.
Table and fields
field5
f,g,h,t,y,I
field6
1,2,3,4,5
field7
1,2,3,4,5,6
field8
1,2,3,4,5,6
field9
1,2,3,4,5,6
field10
1,2,3,4,5,6
field11
1,2,3,4,5,6
I'm using this code to populate the value base on rowsource of the combo box and sameindex as the listbox
Code:
Private Sub List0_AfterUpdate()
With Me
.Text2.Value = Split(.Combo14.Column(1), ",")(.List0.ListIndex)
.Text4.Value = Split(.Combo14.Column(2), ",")(.List0.ListIndex)
.Text6.Value = Split(.Combo14.Column(3), ",")(.List0.ListIndex)
.Text8.Value = Split(.Combo14.Column(4), ",")(.List0.ListIndex)
.Text10.Value = Split(.Combo14.Column(5), ",")(.List0.ListIndex)
.Text12.Value = Split(.Combo14.Column(6), ",")(.List0.ListIndex)
End With
End Sub
Last edited: