Display in a message box the contents of each cell in a table column

Article contributed by Bill Coan

Sub DisplayTextFromCellsInColumn1()

Dim myRange As Range

For Each oCell In Selection.Tables(1).Columns(1).Cells
    Set myRange = oCell.Range
    myRange.SetRange Start:=myRange.Start, End:=myRange.End - 1
    MsgBox myRange.Text
Next oCell

End Sub

Click to view Terms of Use page

Click to view Disclaimer page