Hi All,
I've come up with the following bit of code whihch is to be used to hide rows based on a user input box:
Sub RowHider()
Dim s As String, k As Long
Enterno:
s = InputBox("Enter no of engineers to show (Upto 50)")
If Not IsNumeric(s) Then GoTo Enterno
endrow = 56
If s = 50 Then
Rows("6:57").Hidden = False
ElseIf s > 50 Then GoTo Enterno
Else
Rows("6:57").Hidden = False
Rows((s + 6):56).hidden = true
End If
End Sub
The bit ive underline is the bit i'm struggling with. I basically want it to hide from the number the user has entered + 6 rows so if they enter 20 it would hide rows 26:56
Can anyone help? Thanks in advance.
Bookmarks