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 27 28 29 30 31 32 33 34
| Option Explicit
Dim FL1 As Worksheet, NoCol As Integer
Dim NoLig As Long, Var As Variant
Sub VerifierNombres()
On Error GoTo Erreur
Dim MonNombre As Variant
'
If IsNumeric(Var) = True Then
If Len(Var) = 6 Then
Rows(NoLig & ":" & NoLig).Delete
End If
Else
'code si expression n'est pas numérique
End If
Exit Sub
Erreur:
MsgBox "Une erreur s'est produite..."
End Sub
Sub For_X_to_Next_Ligne()
Set FL1 = Worksheets("DmResultat")
NoCol = 5 'lecture de la colonne E
For NoLig = 7 To Split(FL1.UsedRange.Address, "$")(4)
Var = FL1.Cells(NoLig, NoCol)
VerifierNombres
Next
Set FL1 = Nothing
End Sub |
Partager