Private
Sub
Worksheet_Change(
ByVal
Target
As
Range)
Dim
rng
As
Range, h
As
Double
If
Intersect(Range(
"D6"
), Target)
Is
Nothing
_
Or
Target.Cells.Count > 1 _
Or
Target.Value < 3 _
Or
Target.Value > 173
Then
Exit
Sub
Set
rng = Range(Rows(11), Rows(184))
With
rng
.Hidden =
False
.AutoFit
h = 480 / Target.Value
If
h > ActiveSheet.StandardHeight
Then
_
.RowHeight = 480 / Target.Value
End
With
rng.Resize(rng.Rows.Count - Int(Target.Value)).Hidden =
True
End
Sub