ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Excel worksheet cell comment box (https://www.excelbanter.com/excel-programming/353511-excel-worksheet-cell-comment-box.html)

Donald Stockton

Excel worksheet cell comment box
 
ActiveCell.AddComment
ActiveCell.Comment.Visible = False
ActiveCell.Comment.Text Text:="This is a Test"


The above code will add a comment to the active cell, but how can I also
change the Font properties rather than excel using the default setting?


D.S.

*** Sent via Developersdex http://www.developersdex.com ***

Tom Ogilvy

Excel worksheet cell comment box
 
Sub E()
ActiveCell.AddComment
ActiveCell.Comment.Visible = False
ActiveCell.Comment.Text Text:="This is a Test"
With ActiveCell.Comment.Shape.TextFrame.Characters.Font
.Name = "Times New Roman"
.Size = 12
.Bold = False
End With

End Sub

--
Regards,
Tom Ogilvy



"Donald Stockton" wrote in message
...
ActiveCell.AddComment
ActiveCell.Comment.Visible = False
ActiveCell.Comment.Text Text:="This is a Test"


The above code will add a comment to the active cell, but how can I also
change the Font properties rather than excel using the default setting?


D.S.

*** Sent via Developersdex http://www.developersdex.com ***




[email protected]

Excel worksheet cell comment box
 
Hi
Search this Group using
"How do I change the font inside a cell comment"

regards
Paul


John[_88_]

Excel worksheet cell comment box
 
Hi Donald,

Have a go with this.

Best regards

John



Sub DonaldsComment()

Dim oCmt As Comment

'Set reference to new comment
Set oCmt = ActiveCell.AddComment

'Set visibility & text
oCmt.Visible = False
oCmt.Text "This is a test"

'Set font
With oCmt.Shape.TextFrame.Characters.Font
.Name = "Arial"
.Size = 10
.Bold = False
End With

'Set comment size
With oCmt.Shape
.Width = 100
.Height = 100
End With

End Sub




"Donald Stockton" wrote in message
...
ActiveCell.AddComment
ActiveCell.Comment.Visible = False
ActiveCell.Comment.Text Text:="This is a Test"


The above code will add a comment to the active cell, but how can I also
change the Font properties rather than excel using the default setting?


D.S.

*** Sent via Developersdex http://www.developersdex.com ***




D.S.[_3_]

Excel worksheet cell comment box
 
Thanks to all


"John" wrote in message
...
Hi Donald,

Have a go with this.

Best regards

John



Sub DonaldsComment()

Dim oCmt As Comment

'Set reference to new comment
Set oCmt = ActiveCell.AddComment

'Set visibility & text
oCmt.Visible = False
oCmt.Text "This is a test"

'Set font
With oCmt.Shape.TextFrame.Characters.Font
.Name = "Arial"
.Size = 10
.Bold = False
End With

'Set comment size
With oCmt.Shape
.Width = 100
.Height = 100
End With

End Sub




"Donald Stockton" wrote in message
...
ActiveCell.AddComment
ActiveCell.Comment.Visible = False
ActiveCell.Comment.Text Text:="This is a Test"


The above code will add a comment to the active cell, but how can I also
change the Font properties rather than excel using the default setting?


D.S.

*** Sent via Developersdex http://www.developersdex.com ***






D.S.[_3_]

Excel worksheet cell comment box
 
One more question about the comment box....

Can it be sized? for instance, can I size it to fit the contents?


"D.S." wrote in message
...
Thanks to all


"John" wrote in message
...
Hi Donald,

Have a go with this.

Best regards

John



Sub DonaldsComment()

Dim oCmt As Comment

'Set reference to new comment
Set oCmt = ActiveCell.AddComment

'Set visibility & text
oCmt.Visible = False
oCmt.Text "This is a test"

'Set font
With oCmt.Shape.TextFrame.Characters.Font
.Name = "Arial"
.Size = 10
.Bold = False
End With

'Set comment size
With oCmt.Shape
.Width = 100
.Height = 100
End With

End Sub




"Donald Stockton" wrote in message
...
ActiveCell.AddComment
ActiveCell.Comment.Visible = False
ActiveCell.Comment.Text Text:="This is a Test"


The above code will add a comment to the active cell, but how can I also
change the Font properties rather than excel using the default setting?


D.S.

*** Sent via Developersdex http://www.developersdex.com ***








[email protected]

Excel worksheet cell comment box
 
Hi
Try searching this group using "can I size a comment box to fit the
contents"

regards
Paul


Norman Jones

Excel worksheet cell comment box
 
Hi Don,

In addition to Paul's advice see Debra Dalgleish's suggestions at:

http://www.contextures.com/xlcomments03.html#Resize


---
Regards,
Norman


"D.S." wrote in message
...
One more question about the comment box....

Can it be sized? for instance, can I size it to fit the contents?


"D.S." wrote in message
...
Thanks to all


"John" wrote in message
...
Hi Donald,

Have a go with this.

Best regards

John



Sub DonaldsComment()

Dim oCmt As Comment

'Set reference to new comment
Set oCmt = ActiveCell.AddComment

'Set visibility & text
oCmt.Visible = False
oCmt.Text "This is a test"

'Set font
With oCmt.Shape.TextFrame.Characters.Font
.Name = "Arial"
.Size = 10
.Bold = False
End With

'Set comment size
With oCmt.Shape
.Width = 100
.Height = 100
End With

End Sub




"Donald Stockton" wrote in message
...
ActiveCell.AddComment
ActiveCell.Comment.Visible = False
ActiveCell.Comment.Text Text:="This is a Test"


The above code will add a comment to the active cell, but how can I
also
change the Font properties rather than excel using the default setting?


D.S.

*** Sent via Developersdex http://www.developersdex.com ***









ph8[_35_]

Excel worksheet cell comment box
 

With Range("A1")
..addComment ("This is my sized comment")
..Comment.Shape.Height = 11
..Comment.Shape.Width = 123
End With


--
ph8
------------------------------------------------------------------------
ph8's Profile: http://www.excelforum.com/member.php...o&userid=19871
View this thread: http://www.excelforum.com/showthread...hreadid=513219


D.S.[_3_]

Excel worksheet cell comment box
 
Thanks to all.. All of your suggestions have been very helpfull.


"ph8" wrote in message
...

With Range("A1")
addComment ("This is my sized comment")
Comment.Shape.Height = 11
Comment.Shape.Width = 123
End With


--
ph8
------------------------------------------------------------------------
ph8's Profile:
http://www.excelforum.com/member.php...o&userid=19871
View this thread: http://www.excelforum.com/showthread...hreadid=513219





All times are GMT +1. The time now is 02:04 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com