Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I am using the below code to create comments. Does anyone know if it can
be modified so that the comments contain text from a given cell? ActiveCell.AddComment ActiveCell.Comment.Text Text:="" ActiveCell.Comment.Visible = True With ActiveCell.Comment.Shape.OLEFormat.Object .Font.Name = "Arial" .Font.Size = 20 .Font.Bold = True .Width = 400 .Height = 300 End With End Sub coco ![]() ------------------------------------------------ ~~ Message posted from http://www.ExcelTip.com/ ~~ View and post usenet messages directly from http://www.ExcelForum.com/ |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() ActiveCell.Comment.Text Text:= Range("A1").Text Or ActiveCell.Comment.Text Text:= Cells(1,1).Text "coco" skrev i meddelandet ... I am using the below code to create comments. Does anyone know if it can be modified so that the comments contain text from a given cell? ActiveCell.AddComment ActiveCell.Comment.Text Text:="" ActiveCell.Comment.Visible = True With ActiveCell.Comment.Shape.OLEFormat.Object Font.Name = "Arial" Font.Size = 20 Font.Bold = True Width = 400 Height = 300 End With End Sub coco ![]() ------------------------------------------------ ~~ Message posted from http://www.ExcelTip.com/ ~~ View and post usenet messages directly from http://www.ExcelForum.com/ |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
One way:
With ActiveCell.AddComment( _ Text:=Worksheets("Sheet1").Range("A1").Text) With .Shape With .TextFrame.Characters.Font .Name = "Arial" .Size = 20 .Bold = True End With .Width = 400 .Height = 300 End With .Visible = True End With Adjust your sheet and range reference to suit. In article , coco wrote: I am using the below code to create comments. Does anyone know if it can be modified so that the comments contain text from a given cell? ActiveCell.AddComment ActiveCell.Comment.Text Text:="" ActiveCell.Comment.Visible = True With ActiveCell.Comment.Shape.OLEFormat.Object .Font.Name = "Arial" .Font.Size = 20 .Font.Bold = True .Width = 400 .Height = 300 End With End Sub coco ![]() |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Fantastic!
Both work solutions work perfectly. Thanks for your help guys. coco :D ------------------------------------------------ ~~ Message posted from http://www.ExcelTip.com/ ~~ View and post usenet messages directly from http://www.ExcelForum.com/ |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Cell Comments
http://www.mvps.org/dmcritchie/excel/ccomment.htm Function to obtain cell comments from another cell (#mycomment) http://www.mvps.org/dmcritchie/excel....htm#mycomment Macro to populate comments in a range with text values of another range (#addcomments) http://www.mvps.org/dmcritchie/excel...tm#addcomments Sub CommentPopulateSelection() Dim cell As Range Selection.ClearComments If Trim(ActiveCell.Text) < "" Then For Each cell In Selection cell.AddComment ActiveCell.Text Next cell End If End Sub or from a specific cell cell.AddComment range("B4").Text HTH, David McRitchie, Microsoft MVP - Excel [site changed Nov. 2001] My Excel Pages: http://www.mvps.org/dmcritchie/excel/excel.htm Search Page: http://www.mvps.org/dmcritchie/excel/search.htm "coco" wrote in message ... I am using the below code to create comments. Does anyone know if it can be modified so that the comments contain text from a given cell? ActiveCell.AddComment ActiveCell.Comment.Text Text:="" ActiveCell.Comment.Visible = True With ActiveCell.Comment.Shape.OLEFormat.Object Font.Name = "Arial" Font.Size = 20 Font.Bold = True Width = 400 Height = 300 End With End Sub coco ![]() ------------------------------------------------ ~~ Message posted from http://www.ExcelTip.com/ ~~ View and post usenet messages directly from http://www.ExcelForum.com/ |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
building comments from text cells | Excel Worksheet Functions | |||
Text Box Comments | Excel Discussion (Misc queries) | |||
how can we copy cells comments text and paste to cells | Excel Discussion (Misc queries) | |||
Text disappearing from cells and comments? | Excel Discussion (Misc queries) | |||
Add Comments with Text From Cells | Excel Programming |