1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38
|
Sub execution()
Range("CA59").ClearComments
Range("BH59").ClearComments
Dim a As String
Dim b As String
Dim c As String
Dim d As String
Dim e As String
If Feuil5.Cells(4, 9).Value = "X" Then
a = "Accès Cocktail"
End If
If Feuil5.Cells(4, 10).Value = "X" Then
b = "SASP"
End If
If Feuil5.Cells(4, 11).Value = "X" Then
c = "Comité directeur"
End If
If Feuil5.Cells(4, 12).Value = "X" Then
d = "Membre du club"
End If
If Feuil5.Cells(4, 13).Value = "X" Then
e = "Sponsor"
End If
Feuil1.Range("CA59").AddComment.Text a & vbCrLf & b & vbCrLf & c & vbCrLf & d & vbCrLf & e
With Range("CA59").Comment.Shape
.Width = 130 'Largeur commentaire
.Height = 90 'Hauteur
.OLEFormat.Object.Font.Size = 12 'Taille du texte
.OLEFormat.Object.Interior.ColorIndex = 34 'Couleur de fond
.TextFrame.Characters.Font.ColorIndex = 11 'Couleur de la police
.TextFrame.Characters.Font.Bold = True 'Ecriture gras
.OLEFormat.Object.Font.Name = "Bangle" 'Type de police
End With
End Sub |