Below is the VBA Code I use for my sheet. I have feilds formulated between $A$18:$W$2500, and if they return a blank value or "" then it automatically hides the row. The VBA code was put in well after the sheet was created and the original print_area for the sheet is A17:W150. The Macro only looks at column A for the blanks and from what I can tell has nothing to do with the print_area. But, if I change the print_Area to what I want the Macro quits working properly. When I change print_area (even if I change it to the exact same thing), when I hit the Macro button it just runs indefinetly with no end. If I hit ESC twice and hit end Macro then the Macro stops running and produces the correct results. So in essence, the button (Macro) is still working, it just never stops running once the Print_Area is changed. I need the print area to be A6:W2500 so that it captures the entire return of Non-Hidden fields. Any Ideas why it would be doing this?
Sub L12OVER500_CommandButton1_Click()
With Application
.EnableEvents = False
.ScreenUpdating = False
End With
Dim rCell As Range
For Each rCell In Range("A18:A2500")
If rCell = "" Then
rCell.EntireRow.Hidden = True
Else
rCell.EntireRow.Hidden = False
End If
Next rCell
Application.EnableEvents = True
End Sub
Bookmarks