Hi!
My problem seems rather easy but I cannot get it to work. I need to copy a table, but I do not want all columns.
The below code works but not as expected. It seems to select the right columns (2,3 and 5), but when I paste the result, I get columns 2,3,4, and 5.
Why is that? I do not want column 4. How can I do that?
Thanks for the help.
Mike
My problem seems rather easy but I cannot get it to work. I need to copy a table, but I do not want all columns.
The below code works but not as expected. It seems to select the right columns (2,3 and 5), but when I paste the result, I get columns 2,3,4, and 5.
Why is that? I do not want column 4. How can I do that?
VBA Code:
With ActiveSheet.ListObjects("Table1")
Union(.ListColumns(2).Range, _
.ListColumns(3).Range, _
.ListColumns(5).Range).Copy
End With
Thanks for the help.
Mike