Created
April 8, 2016 10:39
-
-
Save danwagnerco/9df1976624e21c1ad8b01bdab05a3781 to your computer and use it in GitHub Desktop.
Now that we have ClearAllFilters written, let's integrate it back into the original Subroutine!
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'This subroutine creates adds the filtered data from Sheet1 | |
'to a previously-existing destination Worksheet (called "Destination" here) | |
Public Sub AddToDestinationWorksheet(StartDate As String, EndDate As String) | |
'... | |
'Lots of code taken out here for brevity, the first place we're going to replace | |
'the old clear filters logic starts on line 38 of the original | |
'... | |
'Replaced the commented-out code with our new Subroutine, you should actually | |
'delete the commented out lines! | |
Call ClearAllFilters(wksData) | |
'wksData.AutoFilterMode = False | |
'If wksData.FilterMode = True Then | |
' wksData.ShowAllData | |
'End If | |
Exit Sub | |
'... | |
'Lots more code taken out for brevity, the next place we're going to replace | |
'the old clear filters logic starts on line 78 of the original | |
'... | |
'Replaced the commented-out code with our new Subroutine, you should actually | |
'delete the commented out lines! | |
Call ClearAllFilters(wksData) | |
'wksData.AutoFilterMode = False | |
'If wksData.FilterMode = True Then | |
' wksData.ShowAllData | |
'End If | |
'... | |
'The rest of the code wraps up and then we're done! | |
'... | |
End Sub |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment