VB编一个日历的程序,老是出现问题380....
来源:百度知道 编辑:UC知道 时间:2024/05/07 09:24:25
Private Sub setdate()
Dim r%, i%
r% = CInt(Format$(Now, "yyyy"))
i% = r% - 1960
Cboyear.ListIndex = i% ===============这句有问题
r% = CInt(Format$(Now, "mm"))
Cbomonth.ListIndex = (r% - 1)
r% = CInt(Format$(Now, "dd"))
lblday(r% - 1).BorderStyle = 1
selectedate% = r%
End Sub
哪位高手帮帮忙啊!!!
Dim r%, i%
r% = CInt(Format$(Now, "yyyy"))
i% = r% - 1960
Cboyear.ListIndex = i% ===============这句有问题
r% = CInt(Format$(Now, "mm"))
Cbomonth.ListIndex = (r% - 1)
r% = CInt(Format$(Now, "dd"))
lblday(r% - 1).BorderStyle = 1
selectedate% = r%
End Sub
哪位高手帮帮忙啊!!!
Cboyear.ListIndex = i% ===============这句有问题
你的Cboyear的备选条目没有那么多,是不是提示错误 “无效属性值”?
用 DTPicker 控件就可以了,不用这么复杂