In the code which calls PrjByMonth, you're Dimming pMonth, then using it in the arguments without having assigned any value to it. Since it's Dimmed as a date its starting value is 0, or midnight on 1/1/1900(?).
[edit post posting: it seems if pMonth is assigned a value less than 1, only a time element is assigned to it.]
You need to assign something to pMonth before calling the function.
Even if you have a global variable pMonth, this version of pMonth will be local; if you want a global version of pMonth to be used, remove the Dim statement for it in ViewPrjByMth.
BTW, the same applies to strField.
Attaching a workbook would be good.
|