Rebonjour
Essaie quelque chose comme cela :
Private Sub Modifier_Click()
'Pour le bouton Modifier
Dim Ligne As Long
Dim I As Integer
Dim Total
Total = 0
If MsgBox("Confirmez-vous la modification de ce contact ?", vbYesNo, "Demande de confirmation de modification") = vbYes Then
'
' Format_Numerique Macro
'
'
Range("F4:F53,H4:H53,J4:J53,L4:L53,N4:N53,P4:P53,R4:R53,T4:T53,V4:V53,X4:X53,Z4:Z53,AB4:AB53,AD4:AD53,AF4:AF53").Select
Selection.NumberFormat = "0"
If Me.ComboBox1.ListIndex = -1 Then Exit Sub
Ligne = Me.ComboBox1.ListIndex + 4
Ws.Cells(Ligne, "B") = ComboBox2
For I = 1 To 30
If Me.Controls("TextBox" & I).Visible = True Then
Ws.Cells(Ligne, I + 2) = Me.Controls("TextBox" & I)
End If
Next I
For I = 6 To 32 Step 2
If IsNumeric(Ws.Cells(Ligne, I).Value) Then
Total = Total + Ws.Cells(Ligne, I).Value * Ws.Cells(3, I - 1)
End If
Next I
Ws.Cells(Ligne, 34).Value = Total
End If
Unload Me
UserForm1.Show
End Sub
Tes formules sont écrasées par cela :
Ws.Cells(Ligne, 34).Value = Total
Et il semble que cela fonctionne
A plus