«ç»ò¤~¯à¦b¸U¦~¾ä¤W¼W¥[®É¶¡
- ©«¤l
- 5923
- ¥DÃD
- 13
- ºëµØ
- 1
- ¿n¤À
- 5986
- ÂI¦W
- 0
- §@·~¨t²Î
- win10
- ³nÅ骩¥»
- Office 2010
- ¾\ŪÅv
- 150
- ©Ê§O
- ¨k
- ¨Ó¦Û
- ¥xÆW°ò¶©
- µù¥U®É¶¡
- 2010-5-1
- ³Ì«áµn¿ý
- 2022-1-23
        
|
¦^´_ 1# Jared
- Private Sub ¸U¦~¾ä()
- Dim OBtop As Integer, OBLeft As Integer, R As Integer, W As Integer, i As Date
- R = Label1.Top + 30
- ReDim F_OB(1 To Day(DateSerial(ComboBox1, ComboBox2.Value + 1, 0)))
- For i = DateSerial(ComboBox1, ComboBox2, 1) To DateSerial(ComboBox1, ComboBox2.Value + 1, 0) '¦~¤ë1¤é¨ì31¤é
- W = Weekday(i) '¦ì¸m
- 'With¥]Âе{¦¡¬°¤Ñ¼Æ¹Bºâ
- With Controls.Add("Forms.OptionButton.1", i) 'Controls¬°±±¨î¶µ¡FOptionButton¬°³æ¿ï¯Ã
- .Visible = True
- .ControlTipText = i
- .Top = R '³Ì¤W±¨º±Æ
- .Left = Controls("Label" & W).Left '²Ä¤@¦æ§e²{¦ì¸m
- .Height = 15 '°ª«×
- .Width = 30 '¼e«×
- .Caption = Day(i) 'pºâ·í¤ë³Ì«á¤@¤Ñ¤Ñ¼Æ
- End With
- Set F_OB(Day(i)).OB = Controls(i & "") '& c '³æ¿ï¯Ã·|¼u¸õ¥X°T®§
- If Weekday(i) = 7 And Month(i) = Month(i + 1) Then
- R = R + 30 '·í¦ì¸mµ¥©ó7,R´N¥[30 '** ³Æµù n¦Ò¼{¨ì¦P¤ë¥÷¦Ü¤ÖÁÙ¦³¤@¤Ñ **
- End If
- Next
- Me.Frame1.Top = R + 30 '½Õ¾ã ®É¶¡ªº¦ì¸m
- Me.Height = R + Frame1.Height + 60 '½Õ¾ã ªí³æªº°ª«×
- End Sub
½Æ»s¥N½X- Option Explicit
- Public WithEvents OB As MSForms.OptionButton
- Private Sub OB_Click()
- Dim h As String, m As String
- With UserForm1
- h = "00 ®É "
- m = "00 ¤À "
- With .TextBox1
- If Val(.Text) >= 0 And Val(.Text) <= 24 Then h = Format(Val(.Text), "00 ®É ")
- End With
- With .TextBox2
- If Val(.Text) >= 0 And Val(.Text) <= 60 Then m = Format(Val(.Text), "00 ¤À")
- End With
- test.TextBox1.Value = OB.ControlTipText & " " & h & m
- .Hide
- End With
- End Sub
½Æ»s¥N½X |
|
|
|
|
|
|