I have created a report that shows available budget spend, using a drop down list I can show what is available by employee. A macro to remove all "0" lines runs automatically. One of the columns in the report shows the purchase order position and I wish to persons name in the drop down list to auto-populate the filter on a pivot table which only holds the purchase order data (same workbook separate sheet). Not a big deal as I can use the filter drop-down on the pivot table, however, it would be neat and more user friendly. Could I add some code to my auto update VBA? Below is my VBA to auto update. Many thanks for looking have scoured the net for days trying to solve!
Code:
Private Sub Worksheet_Calculate()
Dim r As Range, cell As Range
On Error GoTo ErrHandler
Set r = Sheets("availbud bh").Range("k8:k327")
Application.ScreenUpdating = False
Application.EnableEvents = False
For Each cell In r
If cell.Value = 0 Then
cell.EntireRow.Hidden = True
Else
cell.EntireRow.Hidden = False
End If
Next
ErrHandler:
Application.ScreenUpdating = True
Application.EnableEvents = True
End Sub
Last edited by a moderator: