I have followed a gentleman's directions at: https://www.onlinepclearning.com/exc...iple-criteria/ on creating my setup and it works extremely well however in his provided information he resets the data only on the sheet he is working on. I have created several sheets using the same data filter but I can not figure out how to reset the data on all corresponding sheets. It will only clear the data on the original or first sheet. Here is the code i am using:
Sub SearchSheet()
'
' SearchSheet Macro
'
'
Application.CutCopyMode = False
Sheet2.Range("A3").CurrentRegion.AdvancedFilter Action:=xlFilterCopy, _
CriteriaRange:=Sheet3.Range("AB7:AE8"), CopyToRange:=Sheet3.Range("A5:S5"), Unique:=False
Application.CutCopyMode = False
Sheet2.Range("A3").CurrentRegion.AdvancedFilter Action:=xlFilterCopy, _
CriteriaRange:=Sheet3.Range("AB7:AD8"), CopyToRange:=Sheet6.Range("A6:S6"), Unique:=False
End Sub
Sub ClearSheet()
'
' ClearSheet Macro
'
'
Application.Run "'Bact-T Master Sheet(Original)3A.xlsm'!Recalc"
Range("A6:S15000").Select
Selection.Borders(xlDiagonalDown).LineStyle = xlNone
Selection.Borders(xlDiagonalUp).LineStyle = xlNone
Selection.Borders(xlEdgeLeft).LineStyle = xlNone
Selection.Borders(xlEdgeTop).LineStyle = xlNone
Selection.Borders(xlEdgeBottom).LineStyle = xlNone
Selection.Borders(xlEdgeRight).LineStyle = xlNone
Selection.Borders(xlInsideVertical).LineStyle = xlNone
Selection.Borders(xlInsideHorizontal).LineStyle = xlNone
Selection.ClearContents
Application.Run "'Bact-T Master Sheet(Original)3A.xlsm'!Recalc"
Range("E3:L3").Select
Selection.ClearContents
End Sub
I am mediocre with VBA but I think my issue is that in the ClearSheet macro there has no identified range. It doesnt individualize the sheet or cells to be cleared. I want to reset the data from one button. Any help would be greatly appreciated thanks in advance.
Bookmarks