close

Hello,

I have a macro that I use to automatically unhide the first row of a
group of hidden rows:

Sub UnhideFirstRow()
startrow = ActiveSheet.UsedRange.Row
stoprow = startrow ActiveSheet.UsedRange.Rows.Count - 1
For i = startrow To stoprow
If Rows(i).Hidden Then
Rows(i).Hidden = False
Exit For
End If
Next i
End Sub

How can I define the startrow to use the first visible row instead of
the first row with data? My spreadsheet is set up that I have a set of
unhidden rows with hidden rows at the top and bottom of the page.
(e.g. row 1 has header info that is unhidden and frozen, rows 2-10
hidden but with valid quot;oldquot; data, rows 11-30 unhidden with current
data, rows 31-50 hidden and will be used for data entry once unhidden)
The macro above unhides row 2 and I would like it to unhide 31.

Thanks,

Frank

PS- I can't use a macro that has a predefined row gt; x because every
worksheet has a different quot;rangequot; of unhidden cells.

arrow
arrow
    全站熱搜
    創作者介紹
    創作者 software 的頭像
    software

    software

    software 發表在 痞客邦 留言(0) 人氣()