PDA

View Full Version : Unhide Rows



inked
06-28-2006, 06:00 AM
I have a worksheet that has rows 32 through 37 hidden. It has two rows available to enter data: 30 and 31. I would like once the user enters data into row 30, for the next hidden row to unhide. Thus always showing two rows without data. If the data is deleted, the row would then rehide itself.

Thanks.

Edward

compariniaa
06-28-2006, 10:49 AM
could you post a sample file so we i could get a little better idea? are rows 1-29 always going to have data in them?

inked
06-28-2006, 11:05 AM
Rows 1 - 29 may not always have data in them, but they can always remain visible. I've also attached a sample file.

Thanks in advance.

edward

mdmackillop
06-28-2006, 11:10 AM
Hi Edward,
Welcome to VBAX
Might need a little fine tuning, but I think something like this
Regards
MD

Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Row < 29 Or Target.Row > 37 Then Exit Sub
If Application.WorksheetFunction.CountA(Target.EntireRow) = 0 Then
Target.RowHeight = 0
Else
Target.Offset(2).RowHeight = 12.5
End If
End Sub

inked
06-28-2006, 11:36 AM
Worked like a charm. Thanks a million!

edward

mdmackillop
06-28-2006, 11:45 AM
Glad to help.
When your question has been answered, mark it solved by using the Thread Tools.