bonjour à tous
je ne parviens à bloquer le format nombre sur les textbox 5 et 6 de ce code
merci de votre aide
Kinel
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) = TextBox5
.Cells(derligne, 7) = TextBox6
.Cells(derligne, 19) = DTPicker1
End With
TextBox1.Value = ""
TextBox2.Value = ""
TextBox3.Value = ""
TextBox4.Value = ""
TextBox5.Value = ""
TextBox6.Value = ""
Label14.Visible = False
Application.ScreenUpdating = True
End Sub