79692864

Date: 2025-07-07 12:44:01
Score: 1
Natty:
Report link

I've found a solution :-) .

Before to execute the "Add" method I have to delete the Exception at the same period of my vacation like below

'''

        Set cal = ActiveProject.Resources(resourceName).Calendar
        For j = cal.Exceptions.Count To 1 Step -1

            If cal.Exceptions(j).Start >= startDate And cal.Exceptions(j).Finish <= endDate Then
                cal.Exceptions(j).Delete
            End If
        Next j
Reasons:
  • Has code block (-0.5):
  • Self-answer (0.5):
  • Low reputation (1):
Posted by: user30982757