Dim fd As Date = iif(m=1,New Date(y-1,12,26) ,new Date(y,m-1,26))'获得该月的第一天
改成
Dim fd As Date
If m=1 then
fd = New Date(y-1,12,26) '获得该月的第一天
Else
fd = new Date(y,m-1,26)
End If