bonjour ,je viens vers vous car j'ai un souci et je n'arrive pas a le résoudre
je vous expose mon probleme
j'ai un userform ou je choisi le combobox et le textbox quand je clic sur le commandbutton il doit m'effacer la colonne correspondante au combobox et au textbox
le bug ce situe au niveau Trouve.Column.ClearContents
Private Sub CommandButton1_Click()
Dim Trouve As Range, PlageDeRecherche As Range
Dim Valeur_Cherchee As String, AdresseTrouvee As String
Dim Ma_Forme As Shape
Valeur_Cherchee = TextBox_plan.Value & ComboBox_plan2.Value
Set PlageDeRecherche = Sheets("LISTE ISOLEMENTS").Rows(2)
Set Trouve = PlageDeRecherche.Cells.Find(what:=Valeur_Cherchee, LookAt:=xlWhole)
If Trouve Is Nothing Then
AdresseTrouvee = Valeur_Cherchee & " n'est pas présent dans " & PlageDeRecherche.Address
Else
Trouve.Column.ClearContents
End If
For Each Ma_Forme In ActiveSheet.Shapes
If Ma_Forme.Name = TextBox_plan.Value & ComboBox_plan2.Value Then
Ma_Forme.Delete
Exit For
End If
Set PlageDeRecherche = Nothing
Set Trouve = Nothing
Next Ma_Forme
tri_liste_isolement
Unload menu_repere_plan
End Sub
merci pour votre aide