- ©«¤l
- 4901
- ¥DÃD
- 44
- ºëµØ
- 24
- ¿n¤À
- 4916
- ÂI¦W
- 252
- §@·~¨t²Î
- Windows 7
- ³nÅ骩¥»
- Office 20xx
- ¾\ŪÅv
- 150
- ©Ê§O
- ¨k
- ¨Ó¦Û
- ¥x¥_
- µù¥U®É¶¡
- 2010-4-30
- ³Ì«áµn¿ý
- 2024-11-20
|
¥»©«³Ì«á¥Ñ Hsieh ©ó 2014-5-28 13:45 ½s¿è
¦^´_ 3# reangame
¦æ¨Æ¾äªº»s§@¡AÀ³¸Ón¦³¿ï¾Ü¦~¤ëªº¾÷¨î
³]¸m2Ó¤U©Ô¿ï³æ¦p°Êµe
¤ë¾ä§¹¦¨«á¡A¦æ¨Æªí³æ§A¦ü¥G¤w¸gª¾¹D¼g¦¨¸ê®Æ®w
¦A±Nn¼g¤J¦æ¨Æ¤ë¾äªºÄæ¦ì§ì¥X¨Ó§Y¥i
¤ë¾ä.zip (47.18 KB)
¤u§@ªí¼Ò²Õµ{¦¡½X- Private Sub ComboBox1_Change()
- If ComboBox1 <> "" And ComboBox2 <> "" Then ¦æ¨Æ¾ä»s§@
- End Sub
- Private Sub ComboBox2_Change()
- If ComboBox1 <> "" And ComboBox2 <> "" Then ¦æ¨Æ¾ä»s§@
- End Sub
- Sub ¦æ¨Æ¾ä»s§@()
- Dim Ob As Shape, A As Range
- For Each Ob In Me.Shapes
- If Not Ob.Name Like "ComboBox*" Then Ob.Delete
- Next
- [B3:H8].Clear
- day1 = DateSerial(Val(ComboBox1), Val(ComboBox2), 1)
- day2 = DateSerial(Val(ComboBox1), Val(ComboBox2) + 1, 0)
- w = Weekday(day1, vbMonday)
- For i = day1 To day2
- k = Int((Day(i) + w - 2) / 7)
- s = Weekday(i, 2)
- Set A = [A3].Offset(k, s)
- If s >= 6 Then A.Interior.ColorIndex = 36
- With Me.Shapes.AddLabel(msoTextOrientationHorizontal, A.Left, A.Top, 10, 72)
- .TextFrame.AutoSize = True
- .TextFrame.Characters.Caption = Day(i)
- End With
- Next
- With Range([B3], Cells(A.Row, 8))
- For j = 1 To 4
- With .Borders(j)
- .LineStyle = 1
- .Weight = 2
- .ColorIndex = xlColorIndexAutomatic
- End With
- Next
- End With
- End Sub
- Private Sub Worksheet_Activate()
- With ComboBox1
- For i = .ListCount - 1 To 0 Step -1
- .RemoveItem i
- Next
- For Y = 1999 To 2100
- .AddItem Y
- Next
- .Text = Year(Date)
- End With
- With ComboBox2
- For i = .ListCount - 1 To 0 Step -1
- .RemoveItem i
- Next
- For Y = 1 To 12
- .AddItem Y
- Next
- .Text = Month(Date)
- End With
- End Sub
½Æ»s¥N½X |
|