Converts docstring column into comments on name column. : Cell Comments « Excel « VBA / Excel / Access / Word






Converts docstring column into comments on name column.

 
Private Sub Workbook_AfterXmlImport(ByVal Map As XmlMap, ByVal IsRefresh As Boolean, ByVal Result As XlXmlImportResult)
    If Map.Name <> "application_Map" Then Exit Sub
    Dim cel As Range, ws As Worksheet, rng As Range
    Set ws = ThisWorkbook.Worksheets("Sheet1")
    Set rng = ws.ListObjects(1).ListColumns("name").Range
    For Each cel In rng
        If Not (cel.Comment Is Nothing) Then cel.Comment.Delete
        cel.AddComment cel.Offset(0, 1).Text
        rowID = cel.Row - rng.Row
    Next
End Sub

 








Related examples in the same category

1.Get the comment text
2.Tracking cell changes in a comment
3.Clean the comment
4.resize Comments
5.Count Comments
6.Toggle Comments