j'ai sur une colonne des codes en chiffre et qui commence avec 0
exemple 00102
pour augmenter ce code d'un point j'ai comme resultat 103 au lieu 00103.
voici le code que j'ai utilisé
Private Sub CommandButton10_Click
Dim dl As Long ' dernière ligne
dl = Feuil1.Range("D65536").End(xlUp).Row + 1
Dim x, y As String
For i = 1 To dl
If Feuil1.Cells(i, 5) = client Then
y = Feuil1.Cells(i, 4)
If y > x Then
x = y
End If
End If
Next i
Feuil1.Cells(m, 4) = x + 1 'N°lot
End sub
S.O.S SVP le Forum
Grand Merci
exemple 00102
pour augmenter ce code d'un point j'ai comme resultat 103 au lieu 00103.
voici le code que j'ai utilisé
Private Sub CommandButton10_Click
Dim dl As Long ' dernière ligne
dl = Feuil1.Range("D65536").End(xlUp).Row + 1
Dim x, y As String
For i = 1 To dl
If Feuil1.Cells(i, 5) = client Then
y = Feuil1.Cells(i, 4)
If y > x Then
x = y
End If
End If
Next i
Feuil1.Cells(m, 4) = x + 1 'N°lot
End sub
S.O.S SVP le Forum
Grand Merci