bonjour à tous
j'ai intégré un combobox dans un useform mais je ne parviens pas, avec mes petits moyens, à le paramétrer, même après la lecture de nombreux postes sur le forum.
le but est de proposer parmis 4 choix, un texte qui va se reporter dans la même feuille que les textbox déjà présents. Les choix ne doivent pas être modifiables par l'utilisateur car je vais ensuite appliquer un filtre sur la feuille.
merci de votre aide
Kinel
voici le code actuel:
Private Sub CommandButton1_Click()
Application.ScreenUpdating = False
Dim derligne As Integer
Sheets("Liste").Select
derligne = Sheets(6).Range("A65536").End(xlUp).Row + 1
If TextBox1.Value = "" Then
Label14.Visible = True
Exit Sub
End If
If TextBox2.Value = "" Then
Label14.Visible = True
Exit Sub
End If
If TextBox3.Value = "" Then
Label14.Visible = True
Exit Sub
End If
If TextBox4.Value = "" Then
Label14.Visible = True
Exit Sub
End If
If TextBox5.Value = "" Then
Label14.Visible = True
Exit Sub
End If
If TextBox6.Value = "" Then
Label14.Visible = True
Exit Sub
End If
With Sheets("Liste")
.Cells(derligne, 1) = TextBox1
.Cells(derligne, 2) = TextBox2
.Cells(derligne, 3) = TextBox3
.Cells(derligne, 4) = TextBox4
.Cells(derligne, 5) = CDbl(Replace(TextBox5.Value, ".", ","))
.Cells(derligne, 7) = CDbl(Replace(TextBox6.Value, ".", ","))
.Cells(derligne, 19) = DTPicker1
.Cells(derligne, 8) = DTPicker2
End With
TextBox1.Value = ""
TextBox2.Value = ""
TextBox3.Value = ""
TextBox4.Value = ""
TextBox5.Value = ""
TextBox6.Value = ""
Label14.Visible = False
Application.ScreenUpdating = True
End Sub