Skús si upraviť toto (vkladá komentár do aktívnej bunky):Sub Test()
With ActiveCell
.AddComment
.Comment.Visible = True
.Comment.Text Text:="Autor komentara:" & Chr(10) & "ajldfjalkdjhklhkhkhkjlfjjjjjjjja"
.Comment.Shape.Select
Selection.AutoSize = True
.Comment.Visible = False
End With
End Sub
edit:
tu sa mi podarilo obísť ten select, v podstate šlo o to zistiť, vlastnosť akého objektu je Autosize - je to objekt TextFrame:Sub Test1()
Dim ComSh As TextFrame
With ActiveCell
.AddComment
.Comment.Text Text:="Autor komentara:" & Chr(10) & "ajldfjalkdjhklhkhkhkjlfjjjjjjjja"
Set ComSh = .Comment.Shape.TextFrame
ComSh.AutoSize = True
End With
Set ComSh = Nothing
End Subcitovat
With ActiveCell
.AddComment
.Comment.Visible = True
.Comment.Text Text:="Autor komentara:" & Chr(10) & "ajldfjalkdjhklhkhkhkjlfjjjjjjjja"
.Comment.Shape.Select
Selection.AutoSize = True
.Comment.Visible = False
End With
End Sub
edit:
tu sa mi podarilo obísť ten select, v podstate šlo o to zistiť, vlastnosť akého objektu je Autosize - je to objekt TextFrame:Sub Test1()
Dim ComSh As TextFrame
With ActiveCell
.AddComment
.Comment.Text Text:="Autor komentara:" & Chr(10) & "ajldfjalkdjhklhkhkhkjlfjjjjjjjja"
Set ComSh = .Comment.Shape.TextFrame
ComSh.AutoSize = True
End With
Set ComSh = Nothing
End Subcitovat