Add this to the module
And in the subject line, useCode:Function SubjToPass(strSituation As String, Optional lngOutlier As Long) Dim str As String Select Case strSituation Case ">30" If lngOutlier > 1 Then SubjToPass = "Multiple workflows with more than 30 days" ElseIf lngOutlier = 1 Then SubjToPass = "Single WF with more than 30 days" End If Case "<=30" SubjToPass = "Workflows without more than 30days" End Select End Function
Code:.Subect = SubjToPass(strSituation, lngOutlier)




Reply With Quote
Bookmarks