Re : Problème syntaxe suppression
Rebonjour
Je crois que je suis trop nul en faite. et le pire c'est que je peux meme pas mettre mon fichier il est trop gros meme ziper. Je met mon code au cas ou quelqu'un pourrait m'aider.
Private Sub Supprimer_Click()
Dim Nom As String
Dim cell As Range
Dim msg As Integer
Dim i As Byte
Nom = RechNom.Value
msg = MsgBox("Vous allez supprimer :" & RechNom.Value & "", vbYesNo + vbInformation, "ATTENTION")
If msg = vbYes Then
With Sheets("Données")
For Each cell In .Range("A2:A" & Range("A2").End(xlDown).Row)
If (cell.Value) & " " & cell.Offset(0, 1) = Nom Then
cell.EntireRow.Delete
Exit For
End If
Next cell
End With
Dim Ctrl As Control
For Each Ctrl In UserForm1.Controls
If TypeOf Ctrl Is MSForms.TextBox Then Ctrl.Value = vbNullString 'vide,VbNullString pour éviter " "
Next
Set Ctrl = Nothing
End If
With UserForm2
For i = 1 To x ' x étant le nbre de textbox
Controls("Textbox" & i).Value = ""
Next i
End With
Call EffaceTextBox(Me, "Adresse", "Code", "Ville", "Telfixe", "Teltrav", "Telport", "Ndevis1", "Ndevis2", "Ndevis3", "Ndevis4", "Ndevis5", "Ndevis6", "Ncommande1", "Ncommande2", "Ncommande3", "Ncommande4", "Ncommande5", "Ncommande6", "Cd1", "Cd2", "Cd3", "Cd4", "Cd5", "Cd6", "Cc1", "Cc2", "Cc3", "Cc4", "Cc5", "Cc6")
End Sub