Hello
Does anyone know if you can extend the size of comment boxes to suit the size of the text? It's a real drag when the end of your text gets lost
Johno
Hello
Does anyone know if you can extend the size of comment boxes to suit the size of the text? It's a real drag when the end of your text gets lost
Johno
Re: Extending the size of comment boxes
By the way, I mean the comment boxes that you attach to cells. Not text boxes and such.
johno
Re: Extending the size of comment boxes
See http://www.ozgrid.com/forum/showthread.php?t=19006 and note the new feature in the forum of showing related links below this posting.
Re: Extending the size of comment boxes
Thanks Derk
Re: Extending the size of comment boxes
I've had a read through the attached threads on comment boxes and have not found a solution to another problem I've encountered. Basically, I am trying to remove a comment from a cell and then insert a new one immediately after. My code is:
Cells(3 ,4).Select
With Selection
.ClearComments
.AddComment
.Comment.Shape.Height = 70
.Comment.Shape.Width = 110
.Comment.Visible = False
.Comment.Text Text:= "CommentText"
End If
The old comment is removed but the new one is not inserted. Am I missing something?
Much appreciation to anyone that helps
Johno
Re: Extending the size of comment boxes
Have a try with this maybe does as you require - hope it helps
Jack
Code:
Option Explicit
Sub oldComments()
Cells(3, 4).Select
With Selection
.ClearComments
.AddComment
.Comment.Shape.Height = 70
.Comment.Shape.Width = 110
.Comment.Visible = False
.Comment.Text Text:="CommentText"
End If
End Sub
Display More
Sub NewComments()
' witten by: Jack in the UK
' [url]www.excel-it.com[/url]
' Excel XP / 2003
Dim targetComment As Excel.Range
Dim myHight As Long
Dim myWidth As Long
Set targetComment = ActiveSheet.Cells(3, 4)
myHight = 70
myWidth = 110
With targetComment
.ClearComments
.AddComment
With .Comment
.Shape.Height = myHight
.Shape.Width = myWidth
End With
End With
'// jiuk can be omited
Call NewComments_killVal
End Sub
Display More
Re: Extending the size of comment boxes
Hi Johno,
Your code works for me, once the End statement is corrected.
Don’t have an account yet? Register yourself now and be a part of our community!