Controle avec message

re,

voici la modification,

Private Sub Worksheet_Change(ByVal Target As Range)
Dim v1 As Integer, v2 As Integer
If Target.Count > 1 Then Exit Sub

If Target.Column = 10 Then
    Select Case Target.Value
        Case "": Range("K" & Target.Row & ":M" & Target.Row).ClearContents
                 Exit Sub
        Case 0: v1 = 0: v2 = 0
        Case 1: v1 = 1: v2 = 1
        Case Else: v1 = 0: v2 = 1
    End Select

    Call Test_SaisiR(Target.Row, v1, v2)
End If
End Sub

Sub Test_SaisiR(ligne As Long, n1 As Integer, n2 As Integer)
Dim t, col, i As Integer, n As Double
t = Array("RA", "RC")
col = Array(11, 12)

For i = n1 To n2
Saisi_R:
    n = Application.InputBox("Saisissez un nombre " & t(i), 1)

    If Not IsNumeric(n) Or n = Faux Then
        GoTo Saisi_R
    Else
        Cells(ligne, col(i)) = n
    End If
Next i
End Sub

Bonjour ,

impeccable je te remercie pour ton aide

Rechercher des sujets similaires à "controle message"