Voila le code :
Private Sub CommandButton7_Click()
Dim Lig As Long, Col As Long, r As Range, Rest&
Rest = Application.WorksheetFunction.VLookup(ComboBox1, Sheets("STOCK").Range("A2:D29"), 4, False)
If Me.TextBox86 = "" Or TextBox82 = "" Or TextBox1 = "" Or ComboBox1 = "" Then
MsgBox "Donn�e(s) manquante(s)"
Exit Sub
End If
If Me.TextBox82 > Rest Then
MsgBox "autoris�e"
Exit Sub
End If
With Sheets(Me.ComboBox1.Value)
On Error Resume Next
Lig = Application.Match(Val(Me.TextBox86), Sheets(Me.ComboBox1.Value).[noms], 0)
Col = Application.Match(Me.TextBox1, Application.Transpose(Sheets(Me.ComboBox1.Value).[dates].Value), 0)
If Err = 0 Then
With Application.Index(.[tableau], Lig, Col)
.Value = Me.TextBox82.Value
.ClearComments
If Me.TextBox85.Value <> "" Then .AddComment: .Comment.Text Text:=Me.TextBox85.Value
End With
Else
MsgBox "Donn�e(s) incorrecte(s)"
End If
End With
TextBox82 = ""
TextBox85 = ""
ComboBox1 = ""
End Sub
Ca coince au niveau de Col = Application.Match(Me.TextBox1, Application.Transpose(Sheets(Me.ComboBox1.Value).[dates].Value), 0)
En fait dans un fichier identique a celui utilisé pr les somme, on cherche en fonction du nom, la date demandée et on ecrit dans la cellule correspondante.
Parfois ca marche, parfois non et sans aucune modif ca remarche encore. je suis perdu