Public Function UnMonthDayCount(CurUnYear As Integer, CurUnMonth As Integer) As Integer
Dim UnMonthday
If (CurUnYear \ 4 = CurUnYear / 4 And CurUnYear \ 100 <> CurUnYear / 100) Or CurUnYear \ 400 = CurUnYear / 400 Then ' 月份天数
UnMonthday = Array(0, 31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31)
Else
UnMonthday = Array(0, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31)
End If
UnMonthDayCount = UnMonthday(CurUnMonth)End Function以上即是你要的求X年X月的天数的函数,谢谢使用!
Dim UnMonthday
If (CurUnYear \ 4 = CurUnYear / 4 And CurUnYear \ 100 <> CurUnYear / 100) Or CurUnYear \ 400 = CurUnYear / 400 Then ' 月份天数
UnMonthday = Array(0, 31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31)
Else
UnMonthday = Array(0, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31)
End If
UnMonthDayCount = UnMonthday(CurUnMonth)End Function以上即是你要的求X年X月的天数的函数,谢谢使用!
解决方案 »
- Microstation VBA dwg 到 dgn 的转换
- 怎样把数据库文件夹加入到打包里?
- 用什么样的列表控件可以把显示值和实际值分别绑定到数据集的不同字段?
- evb
- 怎样用vb生成表?
- 关于VB控制驱动类问题
- 谁了解FIX标准吗?
- 哪种技术可以在任何语言系统下进行大量数据的查询?(比如日文\德文windows)
- 关于:ActiveWindow.EnableResize = False
- 使用Listview控件时,只有第一列可以获得焦点. 现在我想实现: 鼠标到达每一行时, 该行的背景变色, 鼠标指针变化. 请问如何实现?
- Smalldatetime的困惑
- 小弟,新来的,请各位大哥、大姐们多关照!!!
private function GetMonthDayCount(Month as string) as integer
GetMonthDayCount=cint(right(format(cdate(format(cdate(Month & "-01")+32,"yyyy-MM") & "-01")-1,"yyyy-MM-dd"),2))
end function
随手写的,没有测试过,不过原理就很明显了。至于第二个问题,不知道你是怎么打印的?
我也用连续纸打过很多东西,但是从来没有不用分页的,
连续纸一样也有高度啊。
把你的打印代码贴出来吧?