Something is not working right and I am not sure what it is...
I am trying to use the Workday function as a part of a macro - if myLTD is greater than myBMLT then I want to set myIRD by using the workday function - taking mySD (start date) plus a set # of days (my LTD + 2 days), and include the holidays located at "Worksheets("Parameters").Range("A2:A30"))". See code below...
I am trying to use the Workday function as a part of a macro - if myLTD is greater than myBMLT then I want to set myIRD by using the workday function - taking mySD (start date) plus a set # of days (my LTD + 2 days), and include the holidays located at "Worksheets("Parameters").Range("A2:A30"))". See code below...
Code:
Set mySD = ActiveCell
Set myLTD = ActiveCell.Offset(0, 9)
If myLTD > myBMLT Then
Set myIRD = WorksheetFunction.WorkDay(mySD, myLTD + 2, Worksheets("Parameters").Range("A2:A30"))
End If
MsgBox myIRD