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

[µo°Ý] ¤U©Ô¦¡²M³æ¸Ì¿ï¾Ü"¿z¿ï¤£­«½Æªº¸ê®Æ"

¥»©«³Ì«á¥Ñ Hsieh ©ó 2013-2-26 14:18 ½s¿è

¦^´_ 3# lifedidi

Sheet2¼Ò²Õ
  1. Private Sub CommandButton1_Click()
  2.    FormA.Show 0
  3. End Sub
½Æ»s¥N½X
FormA¼Ò²Õ
  1. Private Sub CommandButton1_Click()
  2. FormB.Show 0
  3. End Sub

  4. Private Sub UserForm_Initialize()
  5. Set d = CreateObject("Scripting.Dictionary")
  6. With Sheet1
  7.    For Each a In .Range(.[A2], .[A1].End(xlDown))
  8.    d(a.Value) = ""
  9.    Next
  10. End With
  11. ComboBox1.List = d.keys
  12. End Sub
½Æ»s¥N½X
FormB¼Ò²Õ
  1. Private Sub CommandButton1_Click()
  2. FormC.Show 0
  3. FormC.­pºâ 1
  4. End Sub

  5. Private Sub CommandButton2_Click()
  6. FormC.Show 0
  7. FormC.­pºâ 2
  8. End Sub
½Æ»s¥N½X
FormC¼Ò²Õ
  1. Sub ­pºâ(work As Integer)
  2. Dim Ar()
  3. With Sheet1
  4.    For Each a In .Range(.[A2], .[A1].End(xlDown))
  5.       If a.Value = FormA.ComboBox1.Value Then
  6.          ReDim Preserve Ar(s)
  7.          Ar(s) = a.Offset(, 1).Value
  8.          s = s + 1
  9.       End If
  10.    Next
  11. End With
  12. If work = 1 Then ListBox1.AddItem Format(Application.Sum(Ar), "hh:mm:ss")
  13. If work = 2 Then ListBox1.AddItem Format(Application.Average(Ar), "hh:mm:ss")
  14. End Sub
½Æ»s¥N½X
Form Test.zip (12.55 KB)
¾Ç®üµL²P_¤£®¢¤U°Ý

TOP

ÁÂÁ¶W¯Åª©¥DªºÀ°¦£

³oµ§¸ê®Æ¬°

sheet1:
¡@¡@A¡@ ¢Ð
¢°¡@¡´¡@3:05
¢±¡@¡´¡@1:51
¢²¡@¡³¡@0:40
¢³¡@¡³¡@3:01
¢´¡@¡³¡@5:11
¢µ¡@¡°¡@5:01
¢¶¡@¡°¡@3:36
¢·¡@¡°¡@2:11

(¡¯¢Ï¬°²£«~Ãþ§O¡@¢Ð¬°»Ý®É)

¤p§Ì»Ý­nªº¬yµ{¡G

¡i¦bSheet2«Ø¥ß«ö¶s¡j¡÷¡i«ö¤U«áshow¥XAµøµ¡¡j¡÷¡i¤U©Ô¦¡²M³æ¿ï¾Ü¡´¡³¡°¤§¤@¡j¡÷¡i¿ï¾Ü¡´¡j¡÷¡iÂI¿ï½T©w¡j¡÷¡i«ö¤U«áshow¥XBµøµ¡¡j¡÷¡i¢Ðµøµ¡¬°¨â­Ó«ö¶s 1.Á`®É¶¡ 2.¥­§¡®É¶¡¡j¡÷¡iÂI¿ï1.Á`®É¶¡¡j¡÷¡ishow¥XCµøµ¡¡j¡÷¡iCµøµ¡¦³­ÓListBOXÅã¥Ü¥Xµ²ªG¡j

·Ð½Ð¤j¤j«üÂI¡A·PÁ¡C

TOP

¦^´_ 1# lifedidi
ªí³æ¼Ò²Õ
  1. Private Sub UserForm_Initialize()
  2. Set d = CreateObject("Scripting.Dictionary")
  3. With Sheet1
  4.    For Each a In .Range(.[A1], .[A1].End(xlDown))
  5.    d(a.Value) = ""
  6.    Next
  7. End With
  8. ComboBox1.List = d.keys
  9. End Sub
½Æ»s¥N½X
¾Ç®üµL²P_¤£®¢¤U°Ý

TOP

        ÀR«ä¦Û¦b : ¤H­nª¾ºÖ¡B±¤ºÖ¡B¦A³yºÖ¡C
ªð¦^¦Cªí ¤W¤@¥DÃD