Hi Everyone,
I have quick question
How can i add MsgBox if there is no "fail" current week ?
Is it possible to help me to finish this macro ?
Thank you
I have quick question
How can i add MsgBox if there is no "fail" current week ?
Is it possible to help me to finish this macro ?
Thank you
Code:
Sub GetFilterForFails()
'
' GetFilterForFails Macro
'
'
Dim CurrentYear As Integer
Dim previousweek As Integer
Dim slaUK As String
CurrentYear = DatePart("yyyy", Date)
previousweek = DatePart("ww", Date) - 1
slaUK = "SLA builder UK.xlsm"
Sheets("SLA - Order delivery").Select
Selection.AutoFilter
ActiveSheet.ListObjects("tbl_SLA_OrderDelivery").Range.AutoFilter Field:=30, _
Criteria1:=CurrentYear
ActiveSheet.ListObjects("tbl_SLA_OrderDelivery").Range.AutoFilter Field:=29, _
Criteria1:=previousweek
ActiveSheet.ListObjects("tbl_SLA_OrderDelivery").Range.AutoFilter Field:=28, _
Criteria1:="Fail"
End Sub
Last edited by a moderator: