Twitter iPhone pliant OnePlus 11 PS5 Disney+ Orange Livebox Windows 11

Commentaires

13 réponses
Avatar
IMER09
Bonjour à tous

Est il possible d'afficher un commentaire definit d'avance ou present ds une
cellule A1 par exemple, quand on selectionne une cellule dans la colonne I
par exemple
Afin d'eviter de coller un commentaire dans chaque cellule

Merci
--
IMER09

10 réponses

1 2
Avatar
JB
Bonjour,

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Target.Column = 9 Then
If Target.Comment Is Nothing Then Target.AddComment
Target.Comment.Text Text:=[A1].Value
Target.Comment.Shape.TextFrame.AutoSize = True
End If
End Sub

JB
http://boisgontierjacques.free.fr
On 28 mar, 15:17, IMER09 wrote:
Bonjour à tous

Est il possible d'afficher un commentaire definit d'avance ou present ds u ne
cellule A1 par exemple, quand on selectionne une cellule dans la colonne I
par exemple
Afin d'eviter de coller un commentaire dans chaque cellule

Merci
--
IMER09


Avatar
JB
Version un seul commentaire. L'ancien est détruit.

http://cjoint.com/?dCpVxdEFZq

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Target.Column = 9 Then
On Error Resume Next
If [mémo] <> "" Then Range([mémo]).Comment.Delete
If Target.Comment Is Nothing Then Target.AddComment
Target.Comment.Text Text:=[A1].Value
Target.Comment.Shape.TextFrame.AutoSize = True
ActiveWorkbook.Names.Add Name:="mémo", RefersToR1C1:="=" & Chr(3 4)
& Target.Address & Chr(34)
End If
End Sub

JB

On 28 mar, 15:32, JB wrote:
Bonjour,

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
  If Target.Column = 9 Then
    If Target.Comment Is Nothing Then Target.AddComment
    Target.Comment.Text Text:=[A1].Value
    Target.Comment.Shape.TextFrame.AutoSize = True
  End If
End Sub

JBhttp://boisgontierjacques.free.fr
On 28 mar, 15:17, IMER09 wrote:



Bonjour à tous

Est il possible d'afficher un commentaire definit d'avance ou present ds une
cellule A1 par exemple, quand on selectionne une cellule dans la colonne I
par exemple
Afin d'eviter de coller un commentaire dans chaque cellule

Merci
--
IMER09- Masquer le texte des messages précédents -


- Afficher le texte des messages précédents -



Avatar
IMER09
Merci JB
J'ai modifier le code quelque peu, je prefere afficher le commentaire de la
cellule A1 plutot que son contenu

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Target.Column = 9 Then
On Error Resume Next
If [mémo] <> "" Then Range([mémo]).Comment.Delete
If Target.Comment Is Nothing Then Target.AddComment
Target.Comment.Text Text:=[A1].Comment.Text
Target.Comment.Shape.TextFrame.AutoSize = True
ActiveWorkbook.Names.Add Name:="mémo", RefersToR1C1:="=" & Chr(34) &
Target.Address & Chr(34)
End If

Mon commentaire a plusieur ligne avec un format particulier
le format du commentaire n'est pas conservé
Comment puis je le conserver?

Merci
--
IMER09


"JB" wrote:

Version un seul commentaire. L'ancien est détruit.

http://cjoint.com/?dCpVxdEFZq

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Target.Column = 9 Then
On Error Resume Next
If [mémo] <> "" Then Range([mémo]).Comment.Delete
If Target.Comment Is Nothing Then Target.AddComment
Target.Comment.Text Text:=[A1].Value
Target.Comment.Shape.TextFrame.AutoSize = True
ActiveWorkbook.Names.Add Name:="mémo", RefersToR1C1:="=" & Chr(34)
& Target.Address & Chr(34)
End If
End Sub

JB

On 28 mar, 15:32, JB wrote:
Bonjour,

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Target.Column = 9 Then
If Target.Comment Is Nothing Then Target.AddComment
Target.Comment.Text Text:=[A1].Value
Target.Comment.Shape.TextFrame.AutoSize = True
End If
End Sub

JBhttp://boisgontierjacques.free.fr
On 28 mar, 15:17, IMER09 wrote:



Bonjour à tous

Est il possible d'afficher un commentaire definit d'avance ou present ds une
cellule A1 par exemple, quand on selectionne une cellule dans la colonne I
par exemple
Afin d'eviter de coller un commentaire dans chaque cellule

Merci
--
IMER09- Masquer le texte des messages précédents -


- Afficher le texte des messages précédents -







Avatar
JB
http://cjoint.com/?dCq7MnLrpL

Ici seuls le gras et l'italique sont récupérés.

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Target.Column = 9 Then
On Error Resume Next
If [mémo] <> "" Then Range([mémo]).Comment.Delete
If Target.Comment Is Nothing Then Target.AddComment
Target.Comment.Text Text:=[A1].Comment.Text
For i = 1 To Len([A1].Comment.Text)
Target.Comment.Shape.TextFrame.Characters(Start:=i,
Length:=1).Font.Bold = _
[A1].Comment.Shape.TextFrame.Characters(Start:=i,
Length:=1).Font.Bold
Target.Comment.Shape.TextFrame.Characters(Start:=i,
Length:=1).Font.Italic = _
[A1].Comment.Shape.TextFrame.Characters(Start:=i,
Length:=1).Font.Italic
Next i
Target.Comment.Shape.TextFrame.AutoSize = True
ActiveWorkbook.Names.Add Name:="mémo", RefersToR1C1:="=" & Chr(3 4)
& Target.Address & Chr(34)
End If
End Sub



JB


On 28 mar, 16:35, IMER09 wrote:
Merci JB
J'ai modifier le code quelque peu, je prefere afficher le commentaire de l a
cellule A1 plutot que son contenu

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
   If Target.Column = 9 Then
    On Error Resume Next
    If [mémo] <> "" Then Range([mémo]).Comment.Delete
    If Target.Comment Is Nothing Then Target.AddComment
    Target.Comment.Text Text:=[A1].Comment.Text
    Target.Comment.Shape.TextFrame.AutoSize = True
    ActiveWorkbook.Names.Add Name:="mémo", RefersToR1C1:="=" & Chr(34) &
Target.Address & Chr(34)
  End If

Mon commentaire a plusieur ligne avec un format particulier
le format du commentaire n'est pas conservé
Comment puis je le conserver?

Merci
--
IMER09



"JB" wrote:
Version un seul commentaire. L'ancien est détruit.

http://cjoint.com/?dCpVxdEFZq

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
  If Target.Column = 9 Then
    On Error Resume Next
    If [mémo] <> "" Then Range([mémo]).Comment.Delete
    If Target.Comment Is Nothing Then Target.AddComment
    Target.Comment.Text Text:=[A1].Value
    Target.Comment.Shape.TextFrame.AutoSize = True
    ActiveWorkbook.Names.Add Name:="mémo", RefersToR1C1:="=" & Chr(34)
& Target.Address & Chr(34)
  End If
End Sub

JB

On 28 mar, 15:32, JB wrote:
Bonjour,

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
  If Target.Column = 9 Then
    If Target.Comment Is Nothing Then Target.AddComment
    Target.Comment.Text Text:=[A1].Value
    Target.Comment.Shape.TextFrame.AutoSize = True
  End If
End Sub

JBhttp://boisgontierjacques.free.fr
On 28 mar, 15:17, IMER09 wrote:

Bonjour à tous

Est il possible d'afficher un commentaire definit d'avance ou presen t ds une
cellule A1 par exemple, quand on selectionne une cellule dans la col onne I
par exemple
Afin d'eviter de coller un commentaire dans chaque cellule

Merci
--
IMER09- Masquer le texte des messages précédents -


- Afficher le texte des messages précédents -- Masquer le texte de s messages précédents -



- Afficher le texte des messages précédents -





Avatar
IMER09
Merci une fois de plus

Pour la taille des mots:Font.Size
Pour la couleur :Font.Color
mais je perd en rapidité une fois cela ajouté et la couleur n'est pas la
même !! ?

Pour la taille du commentaire aurais tu une piste (en fait je n'en doute
pas, j'ai un peut honte d'abuser)

Merci

--
IMER09


"JB" wrote:

http://cjoint.com/?dCq7MnLrpL

Ici seuls le gras et l'italique sont récupérés.

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Target.Column = 9 Then
On Error Resume Next
If [mémo] <> "" Then Range([mémo]).Comment.Delete
If Target.Comment Is Nothing Then Target.AddComment
Target.Comment.Text Text:=[A1].Comment.Text
For i = 1 To Len([A1].Comment.Text)
Target.Comment.Shape.TextFrame.Characters(Start:=i,
Length:=1).Font.Bold = _
[A1].Comment.Shape.TextFrame.Characters(Start:=i,
Length:=1).Font.Bold
Target.Comment.Shape.TextFrame.Characters(Start:=i,
Length:=1).Font.Italic = _
[A1].Comment.Shape.TextFrame.Characters(Start:=i,
Length:=1).Font.Italic
Next i
Target.Comment.Shape.TextFrame.AutoSize = True
ActiveWorkbook.Names.Add Name:="mémo", RefersToR1C1:="=" & Chr(34)
& Target.Address & Chr(34)
End If
End Sub



JB


On 28 mar, 16:35, IMER09 wrote:
Merci JB
J'ai modifier le code quelque peu, je prefere afficher le commentaire de la
cellule A1 plutot que son contenu

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Target.Column = 9 Then
On Error Resume Next
If [mémo] <> "" Then Range([mémo]).Comment.Delete
If Target.Comment Is Nothing Then Target.AddComment
Target.Comment.Text Text:=[A1].Comment.Text
Target.Comment.Shape.TextFrame.AutoSize = True
ActiveWorkbook.Names.Add Name:="mémo", RefersToR1C1:="=" & Chr(34) &
Target.Address & Chr(34)
End If

Mon commentaire a plusieur ligne avec un format particulier
le format du commentaire n'est pas conservé
Comment puis je le conserver?

Merci
--
IMER09



"JB" wrote:
Version un seul commentaire. L'ancien est détruit.

http://cjoint.com/?dCpVxdEFZq

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Target.Column = 9 Then
On Error Resume Next
If [mémo] <> "" Then Range([mémo]).Comment.Delete
If Target.Comment Is Nothing Then Target.AddComment
Target.Comment.Text Text:=[A1].Value
Target.Comment.Shape.TextFrame.AutoSize = True
ActiveWorkbook.Names.Add Name:="mémo", RefersToR1C1:="=" & Chr(34)
& Target.Address & Chr(34)
End If
End Sub

JB

On 28 mar, 15:32, JB wrote:
Bonjour,

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Target.Column = 9 Then
If Target.Comment Is Nothing Then Target.AddComment
Target.Comment.Text Text:=[A1].Value
Target.Comment.Shape.TextFrame.AutoSize = True
End If
End Sub

JBhttp://boisgontierjacques.free.fr
On 28 mar, 15:17, IMER09 wrote:

Bonjour à tous

Est il possible d'afficher un commentaire definit d'avance ou present ds une
cellule A1 par exemple, quand on selectionne une cellule dans la colonne I
par exemple
Afin d'eviter de coller un commentaire dans chaque cellule

Merci
--
IMER09- Masquer le texte des messages précédents -


- Afficher le texte des messages précédents -- Masquer le texte des messages précédents -



- Afficher le texte des messages précédents -









Avatar
JB
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Target.Column = 3 Then
On Error Resume Next
If [mémo] <> "" Then Range([mémo]).Comment.Delete
If Target.Comment Is Nothing Then Target.AddComment
Target.Comment.Text Text:=[A1].Comment.Text
For i = 1 To Len([A1].Comment.Text)
Target.Comment.Shape.TextFrame.Characters(Start:=i,
Length:=1).Font.Bold = _
[A1].Comment.Shape.TextFrame.Characters(Start:=i,
Length:=1).Font.Bold
Target.Comment.Shape.TextFrame.Characters(Start:=i,
Length:=1).Font.Italic = _
[A1].Comment.Shape.TextFrame.Characters(Start:=i,
Length:=1).Font.Italic
Target.Comment.Shape.TextFrame.Characters(Start:=i,
Length:=1).Font.ColorIndex = _
[A1].Comment.Shape.TextFrame.Characters(Start:=i,
Length:=1).Font.ColorIndex

Next i
Target.Comment.Shape.TextFrame.AutoSize = True
ActiveWorkbook.Names.Add Name:="mémo", RefersToR1C1:="=" & Chr(3 4)
& Target.Address & Chr(34)
End If
End Sub

Pour la taille du commentaire aurais tu une piste ?
Je ne comprends pas


JB

On 28 mar, 17:35, IMER09 wrote:
Merci une fois de plus

Pour la taille des mots:Font.Size
Pour la couleur :Font.Color
mais je perd en rapidité une fois cela ajouté et la couleur n'est pas la
même !! ?

Pour la taille  du commentaire aurais tu une piste (en fait je n'en dout e
pas, j'ai un peut honte d'abuser)

Merci

--
IMER09



"JB" wrote:
http://cjoint.com/?dCq7MnLrpL

Ici  seuls le gras et l'italique sont récupérés.

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
   If Target.Column = 9 Then
    On Error Resume Next
    If [mémo] <> "" Then Range([mémo]).Comment.Delete
    If Target.Comment Is Nothing Then Target.AddComment
    Target.Comment.Text Text:=[A1].Comment.Text
    For i = 1 To Len([A1].Comment.Text)
      Target.Comment.Shape.TextFrame.Characters(Start:=i,
Length:=1).Font.Bold = _
         [A1].Comment.Shape.TextFrame.Characters(Start:=i,
Length:=1).Font.Bold
      Target.Comment.Shape.TextFrame.Characters(Start:=i,
Length:=1).Font.Italic = _
         [A1].Comment.Shape.TextFrame.Characters(Start:=i,
Length:=1).Font.Italic
    Next i
    Target.Comment.Shape.TextFrame.AutoSize = True
    ActiveWorkbook.Names.Add Name:="mémo", RefersToR1C1:="=" & Chr(34)
& Target.Address & Chr(34)
  End If
End Sub

JB

On 28 mar, 16:35, IMER09 wrote:
Merci JB
J'ai modifier le code quelque peu, je prefere afficher le commentaire de la
cellule A1 plutot que son contenu

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
   If Target.Column = 9 Then
    On Error Resume Next
    If [mémo] <> "" Then Range([mémo]).Comment.Delete
    If Target.Comment Is Nothing Then Target.AddComment
    Target.Comment.Text Text:=[A1].Comment.Text
    Target.Comment.Shape.TextFrame.AutoSize = True
    ActiveWorkbook.Names.Add Name:="mémo", RefersToR1C1:=" =" & Chr(34) &
Target.Address & Chr(34)
  End If

Mon commentaire a plusieur ligne avec un format particulier
le format du commentaire n'est pas conservé
Comment puis je le conserver?

Merci
--
IMER09

"JB" wrote:
Version un seul commentaire. L'ancien est détruit.

http://cjoint.com/?dCpVxdEFZq

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
  If Target.Column = 9 Then
    On Error Resume Next
    If [mémo] <> "" Then Range([mémo]).Comment.Delete
    If Target.Comment Is Nothing Then Target.AddComment
    Target.Comment.Text Text:=[A1].Value
    Target.Comment.Shape.TextFrame.AutoSize = True
    ActiveWorkbook.Names.Add Name:="mémo", RefersToR1C1:=" =" & Chr(34)
& Target.Address & Chr(34)
  End If
End Sub

JB

On 28 mar, 15:32, JB wrote:
Bonjour,

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
  If Target.Column = 9 Then
    If Target.Comment Is Nothing Then Target.AddComment
    Target.Comment.Text Text:=[A1].Value
    Target.Comment.Shape.TextFrame.AutoSize = True
  End If
End Sub

JBhttp://boisgontierjacques.free.fr
On 28 mar, 15:17, IMER09 wrote:

Bonjour à tous

Est il possible d'afficher un commentaire definit d'avance ou pr esent ds une
cellule A1 par exemple, quand on selectionne une cellule dans la colonne I
par exemple
Afin d'eviter de coller un commentaire dans chaque cellule

Merci
--
IMER09- Masquer le texte des messages précédents -


- Afficher le texte des messages précédents -- Masquer le text e des messages précédents -



- Afficher le texte des messages précédents -- Masquer le texte de s messages précédents -



- Afficher le texte des messages précédents -







Avatar
JB
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Target.Column = 3 Then
On Error Resume Next
If [mémo] <> "" Then Range([mémo]).Comment.Delete
If Target.Comment Is Nothing Then Target.AddComment
Target.Comment.Text Text:=[A1].Comment.Text
For i = 1 To Len([A1].Comment.Text)
Target.Comment.Shape.TextFrame.Characters(Start:=i,
Length:=1).Font.Bold = _
[A1].Comment.Shape.TextFrame.Characters(Start:=i,
Length:=1).Font.Bold
Target.Comment.Shape.TextFrame.Characters(Start:=i,
Length:=1).Font.Italic = _
[A1].Comment.Shape.TextFrame.Characters(Start:=i,
Length:=1).Font.Italic
Target.Comment.Shape.TextFrame.Characters(Start:=i,
Length:=1).Font.ColorIndex = _
[A1].Comment.Shape.TextFrame.Characters(Start:=i,
Length:=1).Font.ColorIndex
Target.Comment.Shape.TextFrame.Characters(Start:=i,
Length:=1).Font.Size = _
[A1].Comment.Shape.TextFrame.Characters(Start:=i,
Length:=1).Font.Size

Next i
Target.Comment.Shape.TextFrame.AutoSize = True
ActiveWorkbook.Names.Add Name:="mémo", RefersToR1C1:="=" & Chr(3 4)
& Target.Address & Chr(34)
End If
End Sub

http://cjoint.com/?dCsx47Qozf

JB

On 28 mar, 18:01, JB wrote:
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
   If Target.Column = 3 Then
    On Error Resume Next
    If [mémo] <> "" Then Range([mémo]).Comment.Delete
    If Target.Comment Is Nothing Then Target.AddComment
    Target.Comment.Text Text:=[A1].Comment.Text
    For i = 1 To Len([A1].Comment.Text)
      Target.Comment.Shape.TextFrame.Characters(Start:=i,
Length:=1).Font.Bold = _
         [A1].Comment.Shape.TextFrame.Characters(Start:=i,
Length:=1).Font.Bold
      Target.Comment.Shape.TextFrame.Characters(Start:=i,
Length:=1).Font.Italic = _
         [A1].Comment.Shape.TextFrame.Characters(Start:=i,
Length:=1).Font.Italic
      Target.Comment.Shape.TextFrame.Characters(Start:=i,
Length:=1).Font.ColorIndex = _
         [A1].Comment.Shape.TextFrame.Characters(Start:=i,
Length:=1).Font.ColorIndex

    Next i
    Target.Comment.Shape.TextFrame.AutoSize = True
    ActiveWorkbook.Names.Add Name:="mémo", RefersToR1C1:="=" & Chr(34)
& Target.Address & Chr(34)
  End If
End Sub

Pour la taille  du commentaire aurais tu une piste ?


Je ne comprends pas

JB

On 28 mar, 17:35, IMER09 wrote:



Merci une fois de plus

Pour la taille des mots:Font.Size
Pour la couleur :Font.Color
mais je perd en rapidité une fois cela ajouté et la couleur n'est pa s la
même !! ?

Pour la taille  du commentaire aurais tu une piste (en fait je n'en do ute
pas, j'ai un peut honte d'abuser)

Merci

--
IMER09

"JB" wrote:
http://cjoint.com/?dCq7MnLrpL

Ici  seuls le gras et l'italique sont récupérés.

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
   If Target.Column = 9 Then
    On Error Resume Next
    If [mémo] <> "" Then Range([mémo]).Comment.Delete
    If Target.Comment Is Nothing Then Target.AddComment
    Target.Comment.Text Text:=[A1].Comment.Text
    For i = 1 To Len([A1].Comment.Text)
      Target.Comment.Shape.TextFrame.Characters(Start:=i,
Length:=1).Font.Bold = _
         [A1].Comment.Shape.TextFrame.Characters(Start:=i,
Length:=1).Font.Bold
      Target.Comment.Shape.TextFrame.Characters(Start:=i,
Length:=1).Font.Italic = _
         [A1].Comment.Shape.TextFrame.Characters(Start:=i,
Length:=1).Font.Italic
    Next i
    Target.Comment.Shape.TextFrame.AutoSize = True
    ActiveWorkbook.Names.Add Name:="mémo", RefersToR1C1:=" =" & Chr(34)
& Target.Address & Chr(34)
  End If
End Sub

JB

On 28 mar, 16:35, IMER09 wrote:
Merci JB
J'ai modifier le code quelque peu, je prefere afficher le commentair e de la
cellule A1 plutot que son contenu

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
   If Target.Column = 9 Then
    On Error Resume Next
    If [mémo] <> "" Then Range([mémo]).Comment.Delete
    If Target.Comment Is Nothing Then Target.AddComment
    Target.Comment.Text Text:=[A1].Comment.Text
    Target.Comment.Shape.TextFrame.AutoSize = True
    ActiveWorkbook.Names.Add Name:="mémo", RefersToR1C1:=" =" & Chr(34) &
Target.Address & Chr(34)
  End If

Mon commentaire a plusieur ligne avec un format particulier
le format du commentaire n'est pas conservé
Comment puis je le conserver?

Merci
--
IMER09

"JB" wrote:
Version un seul commentaire. L'ancien est détruit.

http://cjoint.com/?dCpVxdEFZq

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
  If Target.Column = 9 Then
    On Error Resume Next
    If [mémo] <> "" Then Range([mémo]).Comment.Delete
    If Target.Comment Is Nothing Then Target.AddComment
    Target.Comment.Text Text:=[A1].Value
    Target.Comment.Shape.TextFrame.AutoSize = True
    ActiveWorkbook.Names.Add Name:="mémo", RefersToR1C1: ="=" & Chr(34)
& Target.Address & Chr(34)
  End If
End Sub

JB

On 28 mar, 15:32, JB wrote:
Bonjour,

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
  If Target.Column = 9 Then
    If Target.Comment Is Nothing Then Target.AddComment
    Target.Comment.Text Text:=[A1].Value
    Target.Comment.Shape.TextFrame.AutoSize = True
  End If
End Sub

JBhttp://boisgontierjacques.free.fr
On 28 mar, 15:17, IMER09 wrote:

Bonjour à tous

Est il possible d'afficher un commentaire definit d'avance ou present ds une
cellule A1 par exemple, quand on selectionne une cellule dans la colonne I
par exemple
Afin d'eviter de coller un commentaire dans chaque cellule

Merci
--
IMER09- Masquer le texte des messages précédents -


- Afficher le texte des messages précédents -- Masquer le te xte des messages précédents -



- Afficher le texte des messages précédents -- Masquer le texte des messages précédents -



- Afficher le texte des messages précédents -- Masquer le texte des messages précédents -


- Afficher le texte des messages précédents -








Avatar
IMER09
Mon commentaire d'origine a une certaine grandeur(plutot vertical), et quand
je selec la cellule de destination le commentaire apparait ds une forme
beaucoup plus alonger horizontalement
La taille de la fenetre commentaire est bcp plus longue ds la cellule de
destination

Pourquoi avoir remplace: If Target.Column = 9 Then par If Target.Column = 3
Then
quand je remplace 9 par 3 ca ne fonctionne plus

Merci

--
IMER09


"JB" wrote:


Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Target.Column = 3 Then
On Error Resume Next
If [mémo] <> "" Then Range([mémo]).Comment.Delete
If Target.Comment Is Nothing Then Target.AddComment
Target.Comment.Text Text:=[A1].Comment.Text
For i = 1 To Len([A1].Comment.Text)
Target.Comment.Shape.TextFrame.Characters(Start:=i,
Length:=1).Font.Bold = _
[A1].Comment.Shape.TextFrame.Characters(Start:=i,
Length:=1).Font.Bold
Target.Comment.Shape.TextFrame.Characters(Start:=i,
Length:=1).Font.Italic = _
[A1].Comment.Shape.TextFrame.Characters(Start:=i,
Length:=1).Font.Italic
Target.Comment.Shape.TextFrame.Characters(Start:=i,
Length:=1).Font.ColorIndex = _
[A1].Comment.Shape.TextFrame.Characters(Start:=i,
Length:=1).Font.ColorIndex

Next i
Target.Comment.Shape.TextFrame.AutoSize = True
ActiveWorkbook.Names.Add Name:="mémo", RefersToR1C1:="=" & Chr(34)
& Target.Address & Chr(34)
End If
End Sub

Pour la taille du commentaire aurais tu une piste ?
Je ne comprends pas


JB

On 28 mar, 17:35, IMER09 wrote:
Merci une fois de plus

Pour la taille des mots:Font.Size
Pour la couleur :Font.Color
mais je perd en rapidité une fois cela ajouté et la couleur n'est pas la
même !! ?

Pour la taille du commentaire aurais tu une piste (en fait je n'en doute
pas, j'ai un peut honte d'abuser)

Merci

--
IMER09



"JB" wrote:
http://cjoint.com/?dCq7MnLrpL

Ici seuls le gras et l'italique sont récupérés.

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Target.Column = 9 Then
On Error Resume Next
If [mémo] <> "" Then Range([mémo]).Comment.Delete
If Target.Comment Is Nothing Then Target.AddComment
Target.Comment.Text Text:=[A1].Comment.Text
For i = 1 To Len([A1].Comment.Text)
Target.Comment.Shape.TextFrame.Characters(Start:=i,
Length:=1).Font.Bold = _
[A1].Comment.Shape.TextFrame.Characters(Start:=i,
Length:=1).Font.Bold
Target.Comment.Shape.TextFrame.Characters(Start:=i,
Length:=1).Font.Italic = _
[A1].Comment.Shape.TextFrame.Characters(Start:=i,
Length:=1).Font.Italic
Next i
Target.Comment.Shape.TextFrame.AutoSize = True
ActiveWorkbook.Names.Add Name:="mémo", RefersToR1C1:="=" & Chr(34)
& Target.Address & Chr(34)
End If
End Sub

JB

On 28 mar, 16:35, IMER09 wrote:
Merci JB
J'ai modifier le code quelque peu, je prefere afficher le commentaire de la
cellule A1 plutot que son contenu

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Target.Column = 9 Then
On Error Resume Next
If [mémo] <> "" Then Range([mémo]).Comment.Delete
If Target.Comment Is Nothing Then Target.AddComment
Target.Comment.Text Text:=[A1].Comment.Text
Target.Comment.Shape.TextFrame.AutoSize = True
ActiveWorkbook.Names.Add Name:="mémo", RefersToR1C1:="=" & Chr(34) &
Target.Address & Chr(34)
End If

Mon commentaire a plusieur ligne avec un format particulier
le format du commentaire n'est pas conservé
Comment puis je le conserver?

Merci
--
IMER09

"JB" wrote:
Version un seul commentaire. L'ancien est détruit.

http://cjoint.com/?dCpVxdEFZq

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Target.Column = 9 Then
On Error Resume Next
If [mémo] <> "" Then Range([mémo]).Comment.Delete
If Target.Comment Is Nothing Then Target.AddComment
Target.Comment.Text Text:=[A1].Value
Target.Comment.Shape.TextFrame.AutoSize = True
ActiveWorkbook.Names.Add Name:="mémo", RefersToR1C1:="=" & Chr(34)
& Target.Address & Chr(34)
End If
End Sub

JB

On 28 mar, 15:32, JB wrote:
Bonjour,

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Target.Column = 9 Then
If Target.Comment Is Nothing Then Target.AddComment
Target.Comment.Text Text:=[A1].Value
Target.Comment.Shape.TextFrame.AutoSize = True
End If
End Sub

JBhttp://boisgontierjacques.free.fr
On 28 mar, 15:17, IMER09 wrote:

Bonjour à tous

Est il possible d'afficher un commentaire definit d'avance ou present ds une
cellule A1 par exemple, quand on selectionne une cellule dans la colonne I
par exemple
Afin d'eviter de coller un commentaire dans chaque cellule

Merci
--
IMER09- Masquer le texte des messages précédents -


- Afficher le texte des messages précédents -- Masquer le texte des messages précédents -



- Afficher le texte des messages précédents -- Masquer le texte des messages précédents -



- Afficher le texte des messages précédents -











Avatar
JB
Chez moi, j'obtiens bien la même taille de commentaire J'ai des saurs
de ligne

http://cjoint.com/?dCsLFfo0fz

JB

On 28 mar, 18:30, IMER09 wrote:
Mon commentaire d'origine a une certaine grandeur(plutot vertical), et qua nd
je selec la cellule de destination le commentaire apparait ds une forme
beaucoup plus alonger horizontalement
La taille de la fenetre commentaire est bcp plus longue ds la cellule de
destination

Pourquoi avoir remplace: If Target.Column = 9 Then par If Target.Column = 3
Then
quand je remplace 9 par 3 ca ne fonctionne plus

Merci

--
IMER09



"JB" wrote:

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
   If Target.Column = 3 Then
    On Error Resume Next
    If [mémo] <> "" Then Range([mémo]).Comment.Delete
    If Target.Comment Is Nothing Then Target.AddComment
    Target.Comment.Text Text:=[A1].Comment.Text
    For i = 1 To Len([A1].Comment.Text)
      Target.Comment.Shape.TextFrame.Characters(Start:=i,
Length:=1).Font.Bold = _
         [A1].Comment.Shape.TextFrame.Characters(Start:=i,
Length:=1).Font.Bold
      Target.Comment.Shape.TextFrame.Characters(Start:=i,
Length:=1).Font.Italic = _
         [A1].Comment.Shape.TextFrame.Characters(Start:=i,
Length:=1).Font.Italic
      Target.Comment.Shape.TextFrame.Characters(Start:=i,
Length:=1).Font.ColorIndex = _
         [A1].Comment.Shape.TextFrame.Characters(Start:=i,
Length:=1).Font.ColorIndex

    Next i
    Target.Comment.Shape.TextFrame.AutoSize = True
    ActiveWorkbook.Names.Add Name:="mémo", RefersToR1C1:="=" & Chr(34)
& Target.Address & Chr(34)
  End If
End Sub

Pour la taille  du commentaire aurais tu une piste ?
Je ne comprends pas


JB

On 28 mar, 17:35, IMER09 wrote:
Merci une fois de plus

Pour la taille des mots:Font.Size
Pour la couleur :Font.Color
mais je perd en rapidité une fois cela ajouté et la couleur n'est pas la
même !! ?

Pour la taille  du commentaire aurais tu une piste (en fait je n'en doute
pas, j'ai un peut honte d'abuser)

Merci

--
IMER09

"JB" wrote:
http://cjoint.com/?dCq7MnLrpL

Ici  seuls le gras et l'italique sont récupérés.

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
   If Target.Column = 9 Then
    On Error Resume Next
    If [mémo] <> "" Then Range([mémo]).Comment.Delete
    If Target.Comment Is Nothing Then Target.AddComment
    Target.Comment.Text Text:=[A1].Comment.Text
    For i = 1 To Len([A1].Comment.Text)
      Target.Comment.Shape.TextFrame.Characters(Start:=i,
Length:=1).Font.Bold = _
         [A1].Comment.Shape.TextFrame.Characters(Start:= i,
Length:=1).Font.Bold
      Target.Comment.Shape.TextFrame.Characters(Start:=i,
Length:=1).Font.Italic = _
         [A1].Comment.Shape.TextFrame.Characters(Start:= i,
Length:=1).Font.Italic
    Next i
    Target.Comment.Shape.TextFrame.AutoSize = True
    ActiveWorkbook.Names.Add Name:="mémo", RefersToR1C1:=" =" & Chr(34)
& Target.Address & Chr(34)
  End If
End Sub

JB

On 28 mar, 16:35, IMER09 wrote:
Merci JB
J'ai modifier le code quelque peu, je prefere afficher le commenta ire de la
cellule A1 plutot que son contenu

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
   If Target.Column = 9 Then
    On Error Resume Next
    If [mémo] <> "" Then Range([mémo]).Comment.Delete
    If Target.Comment Is Nothing Then Target.AddComment
    Target.Comment.Text Text:=[A1].Comment.Text
    Target.Comment.Shape.TextFrame.AutoSize = True
    ActiveWorkbook.Names.Add Name:="mémo", RefersToR1C1: ="=" & Chr(34) &
Target.Address & Chr(34)
  End If

Mon commentaire a plusieur ligne avec un format particulier
le format du commentaire n'est pas conservé
Comment puis je le conserver?

Merci
--
IMER09

"JB" wrote:
Version un seul commentaire. L'ancien est détruit.

http://cjoint.com/?dCpVxdEFZq

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
  If Target.Column = 9 Then
    On Error Resume Next
    If [mémo] <> "" Then Range([mémo]).Comment.Delete
    If Target.Comment Is Nothing Then Target.AddComment
    Target.Comment.Text Text:=[A1].Value
    Target.Comment.Shape.TextFrame.AutoSize = True
    ActiveWorkbook.Names.Add Name:="mémo", RefersToR1C1: ="=" & Chr(34)
& Target.Address & Chr(34)
  End If
End Sub

JB

On 28 mar, 15:32, JB wrote:
Bonjour,

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
  If Target.Column = 9 Then
    If Target.Comment Is Nothing Then Target.AddComment
    Target.Comment.Text Text:=[A1].Value
    Target.Comment.Shape.TextFrame.AutoSize = True
  End If
End Sub

JBhttp://boisgontierjacques.free.fr
On 28 mar, 15:17, IMER09 wrote:

Bonjour à tous

Est il possible d'afficher un commentaire definit d'avance o u present ds une
cellule A1 par exemple, quand on selectionne une cellule dan s la colonne I
par exemple
Afin d'eviter de coller un commentaire dans chaque cellule

Merci
--
IMER09- Masquer le texte des messages précédents -


- Afficher le texte des messages précédents -- Masquer le texte des messages précédents -



- Afficher le texte des messages précédents -- Masquer le text e des messages précédents -



- Afficher le texte des messages précédents -- Masquer le texte de s messages précédents -



- Afficher le texte des messages précédents -









Avatar
JB
J'ai commis une erreur grossière:

http://cjoint.com/?dCsRs06dJE

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Target.Column = 9 Then
On Error Resume Next
If [mémo] <> "" Then Range([mémo]).Comment.Delete
Range("A1").Copy
Target.PasteSpecial Paste:=xlPasteComments
ActiveWorkbook.Names.Add Name:="mémo", RefersToR1C1:="=" & Chr(3 4)
& Target.Address & Chr(34)
End If
End Sub

JB


On 28 mar, 18:37, JB wrote:
Chez moi, j'obtiens bien la même taille de commentaire J'ai des saurs
de ligne

http://cjoint.com/?dCsLFfo0fz

JB

On 28 mar, 18:30, IMER09 wrote:



Mon commentaire d'origine a une certaine grandeur(plutot vertical), et q uand
je selec la cellule de destination le commentaire apparait ds une forme
beaucoup plus alonger horizontalement
La taille de la fenetre commentaire est bcp plus longue ds la cellule de
destination

Pourquoi avoir remplace: If Target.Column = 9 Then par If Target.Colum n = 3
Then
quand je remplace 9 par 3 ca ne fonctionne plus

Merci

--
IMER09

"JB" wrote:

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
   If Target.Column = 3 Then
    On Error Resume Next
    If [mémo] <> "" Then Range([mémo]).Comment.Delete
    If Target.Comment Is Nothing Then Target.AddComment
    Target.Comment.Text Text:=[A1].Comment.Text
    For i = 1 To Len([A1].Comment.Text)
      Target.Comment.Shape.TextFrame.Characters(Start:=i,
Length:=1).Font.Bold = _
         [A1].Comment.Shape.TextFrame.Characters(Start:=i,
Length:=1).Font.Bold
      Target.Comment.Shape.TextFrame.Characters(Start:=i,
Length:=1).Font.Italic = _
         [A1].Comment.Shape.TextFrame.Characters(Start:=i,
Length:=1).Font.Italic
      Target.Comment.Shape.TextFrame.Characters(Start:=i,
Length:=1).Font.ColorIndex = _
         [A1].Comment.Shape.TextFrame.Characters(Start:=i,
Length:=1).Font.ColorIndex

    Next i
    Target.Comment.Shape.TextFrame.AutoSize = True
    ActiveWorkbook.Names.Add Name:="mémo", RefersToR1C1:=" =" & Chr(34)
& Target.Address & Chr(34)
  End If
End Sub

Pour la taille  du commentaire aurais tu une piste ?
Je ne comprends pas


JB

On 28 mar, 17:35, IMER09 wrote:
Merci une fois de plus

Pour la taille des mots:Font.Size
Pour la couleur :Font.Color
mais je perd en rapidité une fois cela ajouté et la couleur n'es t pas la
même !! ?

Pour la taille  du commentaire aurais tu une piste (en fait je n'e n doute
pas, j'ai un peut honte d'abuser)

Merci

--
IMER09

"JB" wrote:
http://cjoint.com/?dCq7MnLrpL

Ici  seuls le gras et l'italique sont récupérés.

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
   If Target.Column = 9 Then
    On Error Resume Next
    If [mémo] <> "" Then Range([mémo]).Comment.Delete
    If Target.Comment Is Nothing Then Target.AddComment
    Target.Comment.Text Text:=[A1].Comment.Text
    For i = 1 To Len([A1].Comment.Text)
      Target.Comment.Shape.TextFrame.Characters(Start:=i,
Length:=1).Font.Bold = _
         [A1].Comment.Shape.TextFrame.Characters(Start: =i,
Length:=1).Font.Bold
      Target.Comment.Shape.TextFrame.Characters(Start:=i,
Length:=1).Font.Italic = _
         [A1].Comment.Shape.TextFrame.Characters(Start: =i,
Length:=1).Font.Italic
    Next i
    Target.Comment.Shape.TextFrame.AutoSize = True
    ActiveWorkbook.Names.Add Name:="mémo", RefersToR1C1: ="=" & Chr(34)
& Target.Address & Chr(34)
  End If
End Sub

JB

On 28 mar, 16:35, IMER09 wrote:
Merci JB
J'ai modifier le code quelque peu, je prefere afficher le commen taire de la
cellule A1 plutot que son contenu

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
   If Target.Column = 9 Then
    On Error Resume Next
    If [mémo] <> "" Then Range([mémo]).Comment.Delete
    If Target.Comment Is Nothing Then Target.AddComment
    Target.Comment.Text Text:=[A1].Comment.Text
    Target.Comment.Shape.TextFrame.AutoSize = True
    ActiveWorkbook.Names.Add Name:="mémo", RefersToR1C1: ="=" & Chr(34) &
Target.Address & Chr(34)
  End If

Mon commentaire a plusieur ligne avec un format particulier
le format du commentaire n'est pas conservé
Comment puis je le conserver?

Merci
--
IMER09

"JB" wrote:
Version un seul commentaire. L'ancien est détruit.

http://cjoint.com/?dCpVxdEFZq

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
  If Target.Column = 9 Then
    On Error Resume Next
    If [mémo] <> "" Then Range([mémo]).Comment.Delete
    If Target.Comment Is Nothing Then Target.AddComment
    Target.Comment.Text Text:=[A1].Value
    Target.Comment.Shape.TextFrame.AutoSize = True
    ActiveWorkbook.Names.Add Name:="mémo", RefersToR1C 1:="=" & Chr(34)
& Target.Address & Chr(34)
  End If
End Sub

JB

On 28 mar, 15:32, JB wrote:
Bonjour,

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
  If Target.Column = 9 Then
    If Target.Comment Is Nothing Then Target.AddComment
    Target.Comment.Text Text:=[A1].Value
    Target.Comment.Shape.TextFrame.AutoSize = True
  End If
End Sub

JBhttp://boisgontierjacques.free.fr
On 28 mar, 15:17, IMER09 wrot e:

Bonjour à tous

Est il possible d'afficher un commentaire definit d'avance ou present ds une
cellule A1 par exemple, quand on selectionne une cellule d ans la colonne I
par exemple
Afin d'eviter de coller un commentaire dans chaque cellule

Merci
--
IMER09- Masquer le texte des messages précédents -


- Afficher le texte des messages précédents -- Masquer l e texte des messages précédents -



- Afficher le texte des messages précédents -- Masquer le te xte des messages précédents -



- Afficher le texte des messages précédents -- Masquer le texte des messages précédents -



- Afficher le texte des messages précédents -- Masquer le texte des messages précédents -


- Afficher le texte des messages précédents -










1 2