1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
| Private Sub ExtraireColonne(ByVal objLbx As Object, ByRef objForm As Object)
'parcourir le nombre de colonne
For n = 0 To objLbx.ColumnCount - 1
objForm.Controls("TextBox" & n + 1).Text = objLbx.List(objLbx.ListIndex, n)
objForm.TextBox1.Text = objLbx.List(objLbx.ListIndex, 0)
objForm.TextBox2.Text = objLbx.List(objLbx.ListIndex, 1)
objForm.TextBox3.Text = objLbx.List(objLbx.ListIndex, 2)
objForm.TextBox4.Text = objLbx.List(objLbx.ListIndex, 3)
objForm.TextBox5.Text = objLbx.List(objLbx.ListIndex, 4)
objForm.TextBox6.Text = objLbx.List(objLbx.ListIndex, 5)
objForm.TextBox7.Text = objLbx.List(objLbx.ListIndex, 6)
objForm.TextBox8.Text = objLbx.List(objLbx.ListIndex, 7)
objForm.TextBox9.Text = objLbx.List(objLbx.ListIndex, 8)
objForm.TextBox10.Text = objLbx.List(objLbx.ListIndex, 9)
objForm.TextBox11.Text = objLbx.List(objLbx.ListIndex, 10)
Next n
End Sub |