I've had a quick look just now... though some of the code is using older methods (and some elements aren't really required) I can't see any stand out code reason (other than the spurious Exit For at the end of the Mailing routine) as to why your code is not doing as you expect...
I think then the focus should therefore really be concentrated upon:
If as implied by the name, MaxOutTime is meant to represent a Time Value of some sort then yes that could potentially cause issues given the variable is Declared as an Integer.
Time in XL is Decimal... the Integer declaration will result in a value of either 0/1 for all Time Value entered into F10 - 0 where <= noon, 1 where > noon.
So it follows that if the contents of I14:I400 are also Time values and that F10 is <= noon then all of these values will indeed be greater than MaxOutTime (0) and hence the emails are issued.
If you believe that's a possibility change MaxOutTime variable type from Integer to Double.
If in doubt post a sample of your OUTTIME LOG so we can see the data type - we need only see the values in F10, I14:I400 - all other values can be removed.
Bookmarks