I have a structured table that looks a bit like this (the dots are so everything lines up here):
[tt]
Column1..|Column2 ..|Column3...|Column4...|
Info.....|Info......|Info......|Info......|
Blank....|Info......|Info......|Info......|
Blank....|Info......|Info......|Info......|
Blank....|Info......|Info......|Info......|
Blank....|Info......|Info......|Info......|
Blank....|Info......|Info......|Info......|
Blank....|Blank.....|Blank.....|Blank.....|
Blank....|Blank.....|Blank.....|Blank.....|
Blank....|Blank.....|Blank.....|Blank.....|
Blank....|Blank.....|Blank.....|Blank.....|
etc.
[/tt]
I'm trying to remove all the completely blank rows, so I tried this code that I found:
but what happens is that Column2 gets deleted. I'm confused as to why that's happening? I don't see how that code is deleting a *column*.
Thanks!!
Matt
[tt]
Column1..|Column2 ..|Column3...|Column4...|
Info.....|Info......|Info......|Info......|
Blank....|Info......|Info......|Info......|
Blank....|Info......|Info......|Info......|
Blank....|Info......|Info......|Info......|
Blank....|Info......|Info......|Info......|
Blank....|Info......|Info......|Info......|
Blank....|Blank.....|Blank.....|Blank.....|
Blank....|Blank.....|Blank.....|Blank.....|
Blank....|Blank.....|Blank.....|Blank.....|
Blank....|Blank.....|Blank.....|Blank.....|
etc.
[/tt]
I'm trying to remove all the completely blank rows, so I tried this code that I found:
Code:
With tbl
.ListColumns("Column2").DataBodyRange.SpecialCells(xlCellTypeBlanks).Rows.Delete
End With
but what happens is that Column2 gets deleted. I'm confused as to why that's happening? I don't see how that code is deleting a *column*.
Thanks!!
Matt