marcello06
XLDnaute Occasionnel
Bonjour à tous le forum
De nouveau je sollicite votre aide car je ne trouve pas mon bonheur dans la recherche
j'utilise un inputbox pour placer un commentaire sur une cellule tout est ok en creation et en suppression mais comment tester si le commentaires est déjà présent et donc passer en modification
Private Sub commentaires()
Dim Celcom As Range
Dim Machaine As String
Application.ScreenUpdating = False
Machaine = Application.InputBox(Prompt:="Saisir le commentaire", Title:="Commentaire", Default:="Info", Type:=2)
For Each Celcom In Selection
If Not Intersect(Celcom, PlageTableau) Is Nothing Then
With Celcom
.AddComment
.Comment.Visible = False
.Comment.Text Text:="INFO Planning:" & Chr(10) & Machaine
End With
End If
Next Celcom
Application.ScreenUpdating = True
End Sub
Merci d'avance pour vos réponses et bonne apm à tous
De nouveau je sollicite votre aide car je ne trouve pas mon bonheur dans la recherche
j'utilise un inputbox pour placer un commentaire sur une cellule tout est ok en creation et en suppression mais comment tester si le commentaires est déjà présent et donc passer en modification
Private Sub commentaires()
Dim Celcom As Range
Dim Machaine As String
Application.ScreenUpdating = False
Machaine = Application.InputBox(Prompt:="Saisir le commentaire", Title:="Commentaire", Default:="Info", Type:=2)
For Each Celcom In Selection
If Not Intersect(Celcom, PlageTableau) Is Nothing Then
With Celcom
.AddComment
.Comment.Visible = False
.Comment.Text Text:="INFO Planning:" & Chr(10) & Machaine
End With
End If
Next Celcom
Application.ScreenUpdating = True
End Sub
Merci d'avance pour vos réponses et bonne apm à tous