Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I have some cells formatted as Text. I need to insert a comment in these
cells and copy the value in the cell to the comment. I need the formatting in the cell to be copied along with the text. So, for example, if the text in the cell is bold, then the text in the comment should also be bold, etc. I am now using: Sub SetComment() With Selection .AddComment .Comment.Visible = True .Comment.Text Text:=.Value End With End Sub This creates the comment and copies the text, but it does not copy the formatting. How do I get the formatting to copy in addition to the value? -- Gary''s Student - gsnu200823 |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Sub SetComment2()
Dim cel As Range Dim cm As Comment Set cel = ActiveCell With cel cel.ClearComments Set cm = .AddComment cm.Text Text:=.Value End With cm.Visible = True With cm.Shape.TextFrame.Characters.Font .Bold = cel.Font.Bold ' etc End With End Sub Regards, Peter T "Gary''s Student" wrote in message ... I have some cells formatted as Text. I need to insert a comment in these cells and copy the value in the cell to the comment. I need the formatting in the cell to be copied along with the text. So, for example, if the text in the cell is bold, then the text in the comment should also be bold, etc. I am now using: Sub SetComment() With Selection .AddComment .Comment.Visible = True .Comment.Text Text:=.Value End With End Sub This creates the comment and copies the text, but it does not copy the formatting. How do I get the formatting to copy in addition to the value? -- Gary''s Student - gsnu200823 |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Thank you!
-- Gary''s Student - gsnu200823 "Peter T" wrote: Sub SetComment2() Dim cel As Range Dim cm As Comment Set cel = ActiveCell With cel cel.ClearComments Set cm = .AddComment cm.Text Text:=.Value End With cm.Visible = True With cm.Shape.TextFrame.Characters.Font .Bold = cel.Font.Bold ' etc End With End Sub Regards, Peter T "Gary''s Student" wrote in message ... I have some cells formatted as Text. I need to insert a comment in these cells and copy the value in the cell to the comment. I need the formatting in the cell to be copied along with the text. So, for example, if the text in the cell is bold, then the text in the comment should also be bold, etc. I am now using: Sub SetComment() With Selection .AddComment .Comment.Visible = True .Comment.Text Text:=.Value End With End Sub This creates the comment and copies the text, but it does not copy the formatting. How do I get the formatting to copy in addition to the value? -- Gary''s Student - gsnu200823 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
How do i copy information from a cell into a comment? | Excel Discussion (Misc queries) | |||
Copy cell to another as a comment | Excel Worksheet Functions | |||
Copy comment to another cell | Excel Programming | |||
copy comment content to cell content as data not as comment | Excel Discussion (Misc queries) | |||
Copy a comment to another cell - How? | Excel Programming |