Hi ShadowMis
Welcome to VBAX.
If you select your code and click on the VBA button, it formats the code as shown.
Try the following revision to your code. If you assign this to a Forms Toolbar button, this will act to toggle between hidden and visible rows.
Sub HideRows()
Dim HiddenRow&, RowRange As Range, RowRangeValue&, i As Long
Const FirstRow As Long = 4
Const LastRow As Long = 180
Const FirstCol As String = "A"
Const LastCol As String = "F"
'Check for hidden rows
For i = FirstRow To LastRow
If Rows(i).Hidden = True Then
Rows(FirstRow & ":" & LastRow).Hidden = False
Exit Sub
End If
Next
'Hide blank rows if none are hidden
ActiveWindow.DisplayZeros = False
Application.ScreenUpdating = False
For HiddenRow = FirstRow To LastRow
Set RowRange = Range(FirstCol & HiddenRow & _
":" & LastCol & HiddenRow)
RowRangeValue = Application.WorksheetFunction.CountBlank(RowRange)
If RowRangeValue <> Cells(1, LastCol).Column - Cells(1, FirstCol).Column + 1 Then
Rows(HiddenRow).EntireRow.Hidden = False
Else
Rows(HiddenRow).EntireRow.Hidden = True
End If
Next HiddenRow
ActiveWindow.DisplayZeros = True
Application.ScreenUpdating = True
End Sub