How can i edit a cell comment...i need to update the cell comment values in loop.
Any help will be appreciated...
How can i edit a cell comment...i need to update the cell comment values in loop.
Any help will be appreciated...
Hello,
to add some text and the the current date to any existing comment in the sheet, for example, use code along the lines of
![]()
Dim cmt As Comment Dim mystr As String For Each cmt In Worksheets("Sheet1").Comments mystr = cmt.Text cmt.Text mystr & " last changed: " & Date Next cmt
for each j value i need to append the respective fault value in the comment box...i need help regarding this..so any one who knows pls let me know its urgent..thanks to all for their support![]()
For j = 2 To v + 1 Sheets("Sheet1").Select fault = Cells(j, 19).Value Affecser = Cells(j, 15).Value Range(num2char(col) & 3).AddComment.Text Text:=fault & "(" & Affecser & ")" Next j
Last edited by sharmanjali87; 12-13-2010 at 05:14 AM.
Your post does not comply with Rule 3 of our Forum RULES. Use code tags around code. Posting code without them makes your code hard to read and difficult to be copied for testing. Highlight your code and click the # at the top of your post window. For more information about these and other tags, found here
try this:
If a cell has a comment, the new text will be appended in a new line. If a cell does not have a comment, it will be skipped, i.e. no comment will be added.![]()
For j = 2 To v + 1 ' Sheets("Sheet1").Select fault = Cells(j, 19).Value Affecser = Cells(j, 15).Value If Not Cells(j, col).Comment Is Nothing Then myStr = Cells(j, col).Comment.Text Cells(j, col).Comment.Delete Cells(j, col).AddComment.Text myStr & Chr(10) & fault & "(" & Affecser & ")" End If Next j
cheers
Thanx for ur reply...its working...
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks