Mark,
I actually looked at your code this time and I notice that in subs UserForm_Initialize and fill_ufCal_dnum you are setting the format of myDate way at the top. That is no good, because when you actually assign a value later in the sub, it takes on the format in which you assign the value.
That should not matter because I wrote those three Functions to handle any date input to them in any format.
Anyway, try this new EndOf Month function
I brainfarted that Month(Date) + 1 does not return a valid number (1) when month = 12Function EOM(dDate As Date) As Date dDate = DateAdd("m", 1, dDate) EOM = DateAdd("d", -1, DateValue(Month(dDate) & "-1-" & Year(dDate))) End Function




Reply With Quote