Adding formatting rules for Comments in Macro
Hello All
I have the following macro at the moment For Each cell In Range("AA19:AA95") Cells(cell.Row, "G").NoteText Text:=cell.Text Next End Sub It is an easy and quick way to have the data shows as comment in column G But now i want to format the data and received the code rngCells.Areas(1).Cells(lCnt).Comment.Shape.TextFr ame.Characters.Font.Size = 14 'rngCells.Areas(1).Cells(lCnt).Comment.Shape.TextF rame.AutoSize = True rngCells.Areas(1).Cells(lCnt).Cells.Comment.Shape. Width = 400 rngCells.Areas(1).Cells(lCnt).Cells.Comment.Shape. Height = 200 But when i will make the following code it is not working For Each cell In Range("AA19:AA95") Cells(cell.Row, "G").NoteText Text:=cell.Text rngCells.Areas(1).Cells(lCnt).Comment.Shape.TextFr ame.Characters.Font.Size = 14 'rngCells.Areas(1).Cells(lCnt).Comment.Shape.TextF rame.AutoSize = True rngCells.Areas(1).Cells(lCnt).Cells.Comment.Shape. Width = 400 rngCells.Areas(1).Cells(lCnt).Cells.Comment.Shape. Height = 200 Next End Sub What should i do to get all the Comment data been formatted correctly?? |
Adding formatting rules for Comments in Macro
Hi,
In whatever range you select : Range("A1").AddComment Range("A1").Comment.Text Text:="Please format as follows...." HTH Cheers Carim |
Adding formatting rules for Comments in Macro
Hi Carim,
Thanks for your answer. But when i would use this it will not update automatically my field in column G (G19:G95) Can somebody send to me the complete coding for this please? |
All times are GMT +1. The time now is 06:24 PM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com