Hi - Appending comment in excel cell works fine with below code with the help of @Sachin_Kharmale , but my new requirement is to check whether comment already there in cell.
If it's already there I need to append new text with existing comment, else I need to add new comment in that cell.
Dim str As String
Dim FinalComment As String
str=GetWorkbook(handle, "").ActiveSheet.Range(cellref,cellref).Comment.text
GetWorkbook(handle, "").ActiveSheet.Range(cellref,cellref).Comment.Delete
FinalComment= str & Comment
GetWorkbook(handle, "").ActiveSheet.Range(cellref,cellref).AddComment(FinalComment)
@Sachin_Kharmale can you guide us how to check whether comment is already there in that cell, if not we need to add new comment with text else need to append new text with existing text.
If it's already there I need to append new text with existing comment, else I need to add new comment in that cell.
Dim str As String
Dim FinalComment As String
str=GetWorkbook(handle, "").ActiveSheet.Range(cellref,cellref).Comment.text
GetWorkbook(handle, "").ActiveSheet.Range(cellref,cellref).Comment.Delete
FinalComment= str & Comment
GetWorkbook(handle, "").ActiveSheet.Range(cellref,cellref).AddComment(FinalComment)
@Sachin_Kharmale can you guide us how to check whether comment is already there in that cell, if not we need to add new comment with text else need to append new text with existing text.