ªð¦^¦Cªí ¤W¤@¥DÃD µo©«

«ç»ò¤~¯à¦b¸U¦~¾ä¤W¼W¥[®É¶¡

«ç»ò¤~¯à¦b¸U¦~¾ä¤W¼W¥[®É¶¡

·Q½Ð°Ý¤j¤j
¦pªG§Ú§Æ±æ¸U¦~¾ä¤W­±¡A¯à°÷¼W¥[®É¶¡ªºÄæ¦ì
µ{¦¡ªº³¡¤À­n«ç»ò²K¥[¤W¥h
¦n¹³¥[¦b­þ¸Ì³£¤£¹ï
¿Ã¹õºI¹Ï01066.jpg ¡@

¥Ø«e¥u¦³Åã¥Ü¤é´Á¡@2014/01/01
­n«ç»ò¼Ë¤~¯àÅã¥Ü    2014/01/01  12:00

¦pªG¨S¦³¶ñ¼g§¹²¦ ·|´£¥Ü®É¶¡Äæ¦ì¨S¦³¶ñ¼g§¹¦¨
´ú¸ÕÀÉ®× ´ú¸Õ¤é´Á®É¶¡.zip (19.22 KB)

§Æ±æ¦³¤j¤j¥i¥H¸Ñ¨M§ÚªººÃ°Ý
§Ú³o¸Ì¤]·|Ä~Äò´ú¸Õ¬Ý¬Ý¡A·P¿E¤£ºÉ¡I
Jared

¦^´_ 1# Jared


  
  1. Private Sub ¸U¦~¾ä()
  2.     Dim OBtop As Integer, OBLeft As Integer, R As Integer, W As Integer, i As Date
  3.         R = Label1.Top + 30
  4.           ReDim F_OB(1 To Day(DateSerial(ComboBox1, ComboBox2.Value + 1, 0)))
  5.           For i = DateSerial(ComboBox1, ComboBox2, 1) To DateSerial(ComboBox1, ComboBox2.Value + 1, 0) '¦~¤ë1¤é¨ì31¤é
  6.         W = Weekday(i) '¦ì¸m
  7.         'With¥]Âе{¦¡¬°¤Ñ¼Æ¹Bºâ
  8.         With Controls.Add("Forms.OptionButton.1", i) 'Controls¬°±±¨î¶µ¡FOptionButton¬°³æ¿ï¯Ã
  9.             .Visible = True
  10.             .ControlTipText = i
  11.             .Top = R '³Ì¤W­±¨º±Æ
  12.             .Left = Controls("Label" & W).Left '²Ä¤@¦æ§e²{¦ì¸m
  13.             .Height = 15      '°ª«×
  14.             .Width = 30       '¼e«×
  15.             .Caption = Day(i) '­pºâ·í¤ë³Ì«á¤@¤Ñ¤Ñ¼Æ
  16.         End With
  17.         Set F_OB(Day(i)).OB = Controls(i & "") '& c  '³æ¿ï¯Ã·|¼u¸õ¥X°T®§
  18.         If Weekday(i) = 7 And Month(i) = Month(i + 1) Then
  19.             R = R + 30 '·í¦ì¸mµ¥©ó7,R´N¥[30   '** ³Æµù ­n¦Ò¼{¨ì¦P¤ë¥÷¦Ü¤ÖÁÙ¦³¤@¤Ñ **
  20.         End If
  21.      Next
  22.        Me.Frame1.Top = R + 30             '½Õ¾ã ®É¶¡ªº¦ì¸m
  23.        Me.Height = R + Frame1.Height + 60 '½Õ¾ã ªí³æªº°ª«×
  24. End Sub
½Æ»s¥N½X
  1. Option Explicit
  2. Public WithEvents OB As MSForms.OptionButton
  3. Private Sub OB_Click()
  4.     Dim h As String, m As String
  5.     With UserForm1
  6.         h = "00 ®É "
  7.         m = "00 ¤À "
  8.         With .TextBox1
  9.             If Val(.Text) >= 0 And Val(.Text) <= 24 Then h = Format(Val(.Text), "00 ®É ")
  10.         End With
  11.         With .TextBox2
  12.             If Val(.Text) >= 0 And Val(.Text) <= 60 Then m = Format(Val(.Text), "00 ¤À")
  13.         End With
  14.         test.TextBox1.Value = OB.ControlTipText & " " & h & m
  15.         .Hide
  16.     End With
  17. End Sub
½Æ»s¥N½X
·P®¦ªº¤ß......(¦b³Â»¶®a±Ú°Q½×°Ï.¥Î¤ß¾Ç²ß·|¦³¶i¨Bªº)
¦ý¸ê·½µL­­,«á´©¦³­­,  ¤@¤Ñ1¤¸ªºÃÙ§U,¤H¤H¦³¯à¤O.

TOP

¦^´_ 2# GBKEE


·PÁ¤j¤jªº¨ó§U
§Ú¦A´ú¸Õ¬Ý¬Ý

¥t¥~¡A§Ú¬Q¤Ñ¤U¤È¦³¼g¥t¥~¤@­Óª©¥»
­Y¬O¨S¦³¶ñ¼g®É¶¡
«h·|¥X²{ĵ§i´£¥Ü
ÂI¿ï¡]®É¡^·|²M°£¤é´Á¿ï¾Ü¨Ã¶ñ¤W¡y00¡z¤À

«j±j¥i¥H¨Ï¥Î
¦ý§Ú·QÀ³¸ÓÁÙ¦³§ó¦nªº¤è¦¡
´ú¸Õ¤é´Á®É¶¡.zip (20.49 KB)
¦A¦¸·PÁ¤j¤j
§Æ±æ¦Û¤v¯à¦A§ó¤W¤@¼h( ^^ )
Jared

TOP

¦^´_ 3# Jared
¥t¥i¨Ï OptionButton ¤£¥i¥Î
  1. Option Explicit
  2. Public WithEvents OB As MSForms.OptionButton
  3. Public WithEvents Tx As MSForms.TextBox
  4. 'UserForm_Initialize ¤¤³]¥ß TextBox1,TextBox2
  5. Private Sub Tx_Change()
  6.     Dim Msg As Boolean, E As Control
  7.     With Tx
  8.         If IsNumeric(.Text) Then
  9.             If Tx.Name = "TextBox1" Then
  10.                 If Val(.Text) > 0 And Val(.Text) <= 24 Then Msg = True
  11.             ElseIf Tx.Name = "TextBox2" Then
  12.                 If Val(.Text) > 0 And Val(.Text) <= 60 Then Msg = True
  13.             End If
  14.         End If
  15.     End With
  16.     For Each E In Tx.Parent.Controls
  17.         If TypeName(E) = "OptionButton" Then E.Enabled = Msg
  18.     Next
  19. End Sub
½Æ»s¥N½X
·P®¦ªº¤ß......(¦b³Â»¶®a±Ú°Q½×°Ï.¥Î¤ß¾Ç²ß·|¦³¶i¨Bªº)
¦ý¸ê·½µL­­,«á´©¦³­­,  ¤@¤Ñ1¤¸ªºÃÙ§U,¤H¤H¦³¯à¤O.

TOP

¥»©«³Ì«á¥Ñ Hsieh ©ó 2014-4-17 23:55 ½s¿è

¦^´_ 1# Jared
ª«¥óÃþ§O¼Ò²Õ¤¤
  1. Private Sub OB_Click()
  2.      test.TextBox1.Value = OB.ControlTipText & " " & UserForm1.TextBox1.Text & ":" & UserForm1.TextBox2.Text
  3.      Unload UserForm1
  4. End Sub
½Æ»s¥N½X
UserForm1¼Ò²Õ¤¤
  1. Private Sub UserForm_Initialize()
  2.     Dim i As Integer, hm$
  3.     For i = 2013 To 2020
  4.         ComboBox1.AddItem i
  5.     Next
  6.     ComboBox1.Value = Year(Date)
  7.     For i = 1 To 12
  8.         ComboBox2.AddItem i
  9.     Next
  10.     ComboBox2.Value = Month(Date)
  11.     hm = Format(Now, "hh:mm")
  12.     TextBox1.Text = Split(hm, ":")(0)
  13.     TextBox2.Text = Split(hm, ":")(1)
  14. End Sub
½Æ»s¥N½X
¾Ç®üµL²P_¤£®¢¤U°Ý

TOP

¦^´_ 4# GBKEE


·PÁ¤j¤jªº¦^ÂСI
¦ý¬O¦pªG§ï¦¨³o¼Ë¡A´N¨S¿ìªk§â·Q­nªº¤é´Á¸ò®É¶¡¶Ç°e¨ìªÅ¥ÕÄæ¦ì¤F(@@)
Jared

TOP

¦^´_ 5# Hsieh


  ÁÂÁ¤j¤j¡I§Ú³£¨S·Q¨ì¥i¥H§ì¨ú¨t²Î®É¶¡
  ¾Ç¨ì¤@©Û¤F~ ^^
Jared

TOP

        ÀR«ä¦Û¦b : ·O´d¨S¦³¼Ä¤H¡A´¼¼z¤£°_·Ð´o¡C
ªð¦^¦Cªí ¤W¤@¥DÃD