1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26
|
Dim controlselect As Control
Dim critere(i,1) as string
// Variables globales
Private Sub DateTimePicker1_ValueChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles DateTimePicker1.ValueChanged, DateTimePicker2.ValueChanged, DateTimePicker3.ValueChanged, DateTimePicker4.ValueChanged, DateTimePicker5.ValueChanged, DateTimePicker6.ValueChanged, DateTimePicker7.ValueChanged
If TypeOf controlselect Is DateTimePicker Then
critere (i,1) = controlselect.value.date.tostring //J'ai une erreur sur cette ligne
End If
TextBox38.Text = critere(i, 1) // Je stocke la valeur qui a été rentrée dans le tableau, dans une texbox pour avoir un apercu visuel
End Sub
//Idem pour les combobox ci-dessous
Private Sub ComboBox1_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ComboBox1.SelectedIndexChanged, ComboBox2.SelectedValueChanged, ComboBox3.SelectedValueChanged, ComboBox4.SelectedValueChanged, ComboBox5.SelectedValueChanged, ComboBox6.SelectedValueChanged, ComboBox7.SelectedValueChanged, ComboBox8.SelectedValueChanged, ComboBox9.SelectedValueChanged, ComboBox10.SelectedValueChanged, ComboBox11.SelectedValueChanged, ComboBox12.SelectedValueChanged, ComboBox13.SelectedValueChanged,
If TypeOf controlselect Is ComboBox Then
critere(i, 1) = controlselect.selectedvalue // erreur a ce niveau du code
End If
TextBox38.Text = critere(i, 1) // Je stocke la valeur qui a été rentrée dans le tableau, dans une texbox pour avoir un apercu visuel
End Sub |
Partager