View Single Post
 
Old 08-07-2014, 12:52 PM
Cosmo Cosmo is offline Windows Vista Office 2007
Competent Performer
 
Join Date: Mar 2012
Posts: 240
Cosmo is on a distinguished road
Default

Untested, but I believe you should be able to change the following lines:
Code:
For i = n To 1 Step -1
fEmpty = True
For Each cel In Tbl.Columns(i).Cells
If Len(cel.Range.Text) > 2 Then
fEmpty = False
Exit For
End If
Next cel
If fEmpty = True Then Tbl.Columns(i).Delete
Next i
to
Code:
For i = n To 1 Step -1
fEmpty = False
For Each cel In Tbl.Columns(i).Cells
If NOT (Len(cel.Range.Text) > 2) Then
fEmpty = True
Exit For
End If
Next cel
If fEmpty = True Then Tbl.Columns(i).Delete
Next i
Reply With Quote