感謝大大大力協助
畫面上呈現的跟我預想的一樣(0口0)"
看來我真的修行不夠><
原本我程式是寫這樣
但程式就判斷找不到DAY_i.Caption 這個成員....
繼續努力中...
Private Sub ComboBox2_Change()
If ComboBox1.ListIndex > -1 Then
chang_day
a = DateSerial(ComboBox1.Value, ComboBox2.Value, 1) '本月起始日
b = DateSerial(ComboBox1.Value, ComboBox2.Value + 1, 1) '下月起始日
c = DateSerial(ComboBox1.Value, ComboBox2.Value + 1, 1) - 1 '本月結束日
d = Weekday(TextBox1) '第一天位置
Else
ComboBox2 = ""
End If
End Sub
Sub chang_day()
Dim i, j, x, y
y = DateSerial(ComboBox1.Value, ComboBox2.Value + 1, 1) - 1
For i = 1 To 42
x = DAY_i - Weekday(DateSerial(ComboBox1.Value, ComboBox2.Value, 1)) + (DAY_i - 3) * 7
DAY_i.Caption = x
Next
End Sub作者: GBKEE 時間: 2013-3-26 10:02
Dim K1, K2, K3 As Integer
Dim yy, dd, mm, wek, dss, dds31, dds30, dds2, dds28, dds29 As Integer
Dim uny, unm, und, unym, unmd As String
Dim weeks(6) As String