Hi,
I add comment in tooltip for a shape with hyperlink.
The size of the tolltip is fixed an unfortunatelly too small.
How to set Autosize for this comment or set the real height ?
I know how to change a Cell comment but it doesn't work with shape
You must know that this comment isn't found in a loop like
Who can help me ?
Thanks.
I add comment in tooltip for a shape with hyperlink.
The size of the tolltip is fixed an unfortunatelly too small.
How to set Autosize for this comment or set the real height ?
Code:
Sub AddComm()
Dim Sh As Shape
Dim txt As String
Dim i As Integer
On Error Resume Next
ActiveSheet.Shapes("Carre").Cut
ActiveSheet.Shapes.AddShape(msoShapeRectangle, 43.5, 27#, 53.25, 48.75). _
Select
Selection.ShapeRange.Fill.ForeColor.SchemeColor = 10
Selection.Name = "Carre"
For i = 1 To 20
txt = txt & "abcdefgh" & i & Chr(10)
Next
ActiveSheet.Hyperlinks.Add Anchor:=Selection.ShapeRange.Item(1), Address:= _
"", SubAddress:="Feuil1!A1", ScreenTip:=txt
[A1].Select
End Sub
Code:
[COLOR=#408000][FONT=Segoe UI]Cells(noLig, 6).Comment.Shape.Select[/FONT][/COLOR]
[COLOR=#408000][FONT=Segoe UI]Selection.ShapeRange.ScaleWidth 1.5, msoFalse, msoScaleFromTopLeft[/FONT][/COLOR]
[COLOR=#408000][FONT=Segoe UI]Selection.ShapeRange.ScaleHeight 4, msoFalse, msoScaleFromTopLeft[/FONT][/COLOR]
You must know that this comment isn't found in a loop like
Code:
Public Sub Comments_AutoSize()
Dim Cmt As Comment
Dim lHeight As Long
For Each Cmt In ActiveSheet.Comments
With Cmt
.Shape.TextFrame.AutoSize = True
End With
Next Cmt
End Sub
Who can help me ?
Thanks.