Imputbox > Annuler ou croix renvoi erreur

Bonjour à tous,

Bon alors voici mon code qui me créé une imputbox (quand je change la valeur d'une cellule) et dont le texte entrer deviendra le commentaire de la cellule.

Seul problème quand l'imputBox est ouverte si je clique sur annuler ou la croix cela me renvoi un bug.

J'ai trouver de nombreux sujets sur ce problème mais aucun ne m'a permis de le résoudre, est-ce que qqn serait quel est le problème dans mon cas?

Un grand merci d'avance

Dim KeyCells As Range

    Set KeyCells = Range("V:V")

    If Not Application.Intersect(KeyCells, Range(Cellule.Address)) _
           Is Nothing Then

If Cellule <> "" Then

com = InputBox("Commentario : Explicar las causas del retraso.")
Cellule.ClearComments
Cellule.AddComment
Application.DisplayAlerts = False
Cellule.Comment.Text Text:=com

Else
Cellule.ClearComments
End If

    End If

Bonjour,

À tester ...

    Com = InputBox("Commentario : Explicar las causas del retraso.")
    If impubox <> "" Then
        Cellule.ClearComments
        Cellule.AddComment
        Application.DisplayAlerts = False
        Cellule.Comment.Text Text:=Com
    End If

ric

Bonjour,

Essaie :

com = Application.InputBox("Commentario : Explicar las causas del retraso.", type:=2)
Cellule.ClearComments
Cellule.AddComment
Application.DisplayAlerts = False
If Not com=VbNullString Then
Cellule.Comment.Text Text:=com
End If

C'est parfait c'est exactement ce que je voulais ça marche parfaitement

Un grand merci Ric

Merci quand même Pedro22

Rechercher des sujets similaires à "imputbox annuler croix renvoi erreur"