A minor modification of your code worked for me in xl2002.
i = 2
Rows(i).Hidden = True
but this:
I=2
Rows(i).Select '<--added S to Row(s)
Selection.EntireRow.Hidden = True
behaved the way you described, too. Since you selected that row, it included
the merged cells.
What version of xl are you using?
Merged cells behavior has changed through different versions of excel.
I think that this is the way xl97 behaved with merged cells. And even the code
that worked for me wouldn't do what you wanted in xl97.
Marijan Glavac wrote:
Hi,
I have situation like this :
In first column I have merged cells ( Merged cells =A1,A2).Colum B haven't
merged.I try thruog code hide row 2 but I hide row 1 and row 2.Here is my
code :
I=2
Row(i).Select
Selection.EntireRow.Hidden = True
Where is my mistaque ?
Thanks in advance
--
Dave Peterson