Hi all, I'm working with a macro to copy a comment of a cell from 1 worksheet and pasting the comment on a cell in another worksheet. Then i was struck wif the .addcomment code. Please help and thanks. The code is as follows..

Dim tempstr1 As String 'variable for sheet 1
Dim tempstr2 As String 'variable for summary
Dim temprange1 As Integer 'cell no for sheet 1
Dim temprange2 As Integer 'cell no for summary
Dim tempcomment As String 'cell comment

temprange1 = 1 'Declaring cell 1 for sheet 1
Do Until (temprange1 > 5) 'Looping through the values to copy
Range("B" & temprange1).Select 'pulling out the value of cell from sheet 1
Application.CutCopyMode = False
tempstr1 = Selection.Value
'If range("B" & temprange1).Comment <> "" Then
tempcomment = Selection.Comment.Text
'End If
temprange2 = 1 'Declaring cell 1 for summary sheet

Do Until (temprange2 > 5) 'looping the no of times
Range("E" & temprange2).Select
tempstr2 = Selection.Value
If tempstr2 = tempstr1 Then 'searching the cell to copy

Worksheets("SUMMARY").Range("E" & temprange2).AddComment tempcomment 'area of struck

Exit Do
temprange2 = temprange2 + 1
End If

temprange1 = temprange1 + 1

End Sub