Hi umesh,
Change:
If bDel = True Then .Delete
to:
If bDel = True And i > 1 Then .Delete
The code does not
select any table. What it does is to loop through the table objects collection, looking for tables whose first cell has the word 'Date' or 'Period'. All of that is managed by:
Code:
For Each oTbl In .Tables
With oTbl
Set Rng = .Cell(1, 1).Range
Rng.End = Rng.End - 1
If UCase(Rng.Text) <> "DATE" And UCase(Rng.Text) <> "PERIOD" Then GoTo NextTable
As for the unwanted colouring, that has been applied via shading, not by highlighting.