GoKats78
11-21-2008, 08:51 AM
I have a large spreadheet that needs to be filtered (due to the nature it is easier to use code than AutoFilter).
I have the filter built - the user selects the filter they want to apply from a dropdown. That all works...What I need to figure out is how to apply a "default filter" when the user selects to dropdown l(ocated at D8) and deletes the value (e.g. the filter applied is "Hide Void" - if the user moves to D8 and hits delete).
Here is what I have...but the "Case Else" is not working when the values are deleted...
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Count > 1 Then Exit Sub
If Target.Column = 4 Then
Select Case Target.Value
Case "Hide Pre 2008": Call Show2008On
Case "Show Pre 2008": Call ShowAll5
Case "Show In Audit": Call In_Audit
Case "Hide Void": Call HideVoid3
Case "Show 2008 On": Call Show_all
Case "Show All": Call ShowAll5
Case "Show Void": Call ShowVoid3
Case "Show Open": Call ShowOpen3
Case "Show Awaiting Internal Review": Call ShowIntReview
Case Else: Call Show2008On
End Select
End If
I have the filter built - the user selects the filter they want to apply from a dropdown. That all works...What I need to figure out is how to apply a "default filter" when the user selects to dropdown l(ocated at D8) and deletes the value (e.g. the filter applied is "Hide Void" - if the user moves to D8 and hits delete).
Here is what I have...but the "Case Else" is not working when the values are deleted...
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Count > 1 Then Exit Sub
If Target.Column = 4 Then
Select Case Target.Value
Case "Hide Pre 2008": Call Show2008On
Case "Show Pre 2008": Call ShowAll5
Case "Show In Audit": Call In_Audit
Case "Hide Void": Call HideVoid3
Case "Show 2008 On": Call Show_all
Case "Show All": Call ShowAll5
Case "Show Void": Call ShowVoid3
Case "Show Open": Call ShowOpen3
Case "Show Awaiting Internal Review": Call ShowIntReview
Case Else: Call Show2008On
End Select
End If