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

[µo°Ý] ListBox»P±Æ§Ç¥[Á`°ÝÃD

¦^´_ 49# GBKEE


   1 ¦^ª©¤j
    ¤@¶}©lªº¬O¹ïªº  
    ±z­×§ï«áªº¤Ï¦Ó¤£¹ï¤F~
   
     ¦¹¹Ïªº·N«ä¬O¡AEX:¤W­±ªº«e¤­¶µ¸ê®Æ ´N¬O²Å¦X "TR±Æ¾÷&²£¥X" ²Ä¤@¦æªº¸ê°T©Ò¿z¿ï¥X¨Óªº
     ¬Û¹ïªº³o¨Ç¸ê®Æ¬O±q¤u§@ªí2¿z¥X¨Óªº¡A¤U­±ªº¸ê°T¬O¤u§@ªí2±Æ°£¨º5µ§³Ñ¤Uªº¸ê®Æ¡A¤u§@ªí2ªº¼Æ¶q¤w¸g±q¤j¦Ü¤p±Æ¦n¤F
     ´N¥Ñ¼Æ¶q¤j¨ì¤p§e²{´N¥i¥H¤F
   

   
   
    ³o±i¹Ï¬Oª©¤j¦a2­ÓListBox ¡A½T¹ê¬O­n§e²{³o¼Ëªº¸ê°T
    ¥u¬O¦n¹³¤Ö¤F´X¶µ¤º®e
   
    ·|¦³³o10Ädªº¤º®e

    ¦]¬°§Ú¥Ø«eÁÙ¥d¦b«¬ºA°»´ú¿ù»~³o¶¥¬q
    ©Ò¥H§Ú¤]¬Ý¤£¥Xª©¤j¦a2­ÓListBox§e²{ªº¸ê®Æ¬O¤£¬O³o¨Ç...
   
    PS:   ²Ä¤@­ÓListBoxªº³o¨âµ§¸ê°T¥i¥H¹ï½Õ¦ì¸m¶Ü¡A¶K¤W¥hªº³¡¤À¤]­è¦nÄA­Ë¤F
   


    TR00.rar (569.88 KB)

TOP

¦^´_ 51# starbox520

EX:¤W­±ªº«e¤­¶µ¸ê®Æ ´N¬O²Å¦X "TR±Æ¾÷&²£¥X" ²Ä¤@¦æªº¸ê°T©Ò¿z¿ï¥X¨Óªº,  ½Ð¥Î¹Ï¥Ü¼Ð¥X­þ¤@¦æ
·|¦³³o10Ädªº¤º®e:2003ª©ListBox¥u¯àÅã¥Ü9Äæ
  1.   
  2. '44# ©Ò»¡¥X²{°»¿ù¿ù»~...
  3. ' If .Cells(i, "A") = A(1) And .Cells(i, "E") = A(2) And .Cells(i, "G") = A(3) And .Cells(i, "F") = A(4) Then
  4.             If .Cells(i, "A") = A(1) And .Cells(i, "E") = A(2) And .Cells(i, "G") = A(3) And CStr(.Cells(i, "F")) = A(4) Then
½Æ»s¥N½X


²Ä¤@­ÓListBoxªº³o¨âµ§¸ê°T¥i¥H¹ï½Õ¦ì¸m¶Ü¡A¶K¤W¥hªº³¡¤À¤]­è¦nÄA­Ë¤F
¬Ý¹Ï¥Ü ¬O­þ¸Ì½Õ¦ì¸m
·P®¦ªº¤ß......(¦b³Â»¶®a±Ú°Q½×°Ï.¥Î¤ß¾Ç²ß·|¦³¶i¨Bªº)
¦ý¸ê·½µL­­,«á´©¦³­­,  ¤@¤Ñ1¤¸ªºÃÙ§U,¤H¤H¦³¯à¤O.

TOP

¦^´_ 52# GBKEE


     ¥i¥H¤F...­ì¨Ó¬O§Ú©ñ¿ù¦a¤è
     C¤jªº¤èªk¬O¥i¦æªº~~~~~!!!!
     ­ì©lªº¤u§@ªí2§Ú¤]­×¥¿¦n¤F!!!!
     ­ì¨Ó³o­ÓÃö«Y¬O±q§Ú³oÃä¥X¤F°ÝÃD....
   
      ³Ñ¤UªºListBox1   ³Ñ¤Uªº¸ê®Æ¦³¿ìªk¦b¥[¼Æ¶q¥Ñ¤j¦Ü¤p¤W¥h¶Ü
      #49(1)   ©Ò»¡ªº
     
     ²Ä2­ÓLIstBox¥i¥H§ï¦¨³o9Äd¶Ü
     


     ªþ¤W§Ú¤]­×§ï¦nªº    TR00.rar (569.21 KB)

TOP

¦^´_ 52# GBKEE


      ¨t²ÎÅã¥Ü½s¿è®É¶¡¶W¹L¤F
      ²Ä2­ÓLIstBox¥i¥H§ï¦¨³o9Äd¶Ü   ( T/Y§ï¦¨customer)     ®É¶¡ªº¸ê®Æ¤j¤j±z¨ú¨ìBÄæ"Queue Time"À³¸Ó¬OPÄæ"Oven OutTime"
       Customer       Location       Device     Package      BodySize     LC        QTY        Schedule       Oven OutTime

TOP

¥»©«³Ì«á¥Ñ GBKEE ©ó 2016-10-28 05:22 ½s¿è

¦^´_ 54# starbox520



¹Ïªí¬O¤u§@ªí2¤Wªº¸ê®Æ,§A­n»¡²M·¡¨Ì¾Ú­þ¸Ì§ì¥X¨Ó.


51#¤W»¡; ¦¹¹Ïªº·N«ä¬O¡AEX:¤W­±ªº«e¤­¶µ¸ê®Æ ´N¬O²Å¦X "TR±Æ¾÷&²£¥X" ²Ä¤@¦æªº¸ê°T©Ò¿z¿ï¥X¨Óªº
     ¬Û¹ïªº³o¨Ç¸ê®Æ¬O±q¤u§@ªí2¿z¥X¨Óªº¡A¤U­±ªº¸ê°T¬O¤u§@ªí2±Æ°£¨º5µ§³Ñ¤Uªº¸ê®Æ¡A¤u§@ªí2ªº¼Æ¶q¤w¸g±q¤j¦Ü¤p±Æ¦n¤F
     ´N¥Ñ¼Æ¶q¤j¨ì¤p§e²{´N¥i¥H¤F
  ¬O±Æ¦b¤u§@ªí2¤W¶Ü

"TR±Æ¾÷&²£¥X" ²Ä¤@¦æªº¸ê°T ,¨S¿ìªk§ì¹Ï¥Ü³o«e¤­¶µ¸ê®Æ

49# ¤WPS:TR±Æ¾÷&²£¥X¼Ò²Õ ¦³­×¥¿,½Ð­×¥¿§AªºÀÉ®×

­×¥¿«á³o¬qµ{¦¡½X¬O¥¿½Tªº
  1. If .Cells(i, "A") = A(1) And .Cells(i, "E") = A(2) And .Cells(i, "G") = A(3) And .Cells(i, "F") = A(4) Then
½Æ»s¥N½X
µL¶·§ï¦¨
  1. If .Cells(i, "A") = A(1) And .Cells(i, "E") = A(2) And .Cells(i, "G") = A(3) And CStr(.Cells(i, "F")) = A(4) Then
½Æ»s¥N½X
²Ä2­ÓLIstBox¥i¥H§ï¦¨³o9Äd¶Ü   ( T/Y§ï¦¨customer)     ®É¶¡ªº¸ê®Æ¤j¤j±z¨ú¨ìBÄæ"Queue Time"À³¸Ó¬OPÄæ"Oven OutTime"
       Customer       Location       Device     Package      BodySize     LC        QTY        Schedule       Oven OutTime
³o¸Ì­×§ï¸Õ¸Õ¬Ý
  1. Private Sub Ex_WIP()
  2. Dim i As Integer, Ar, A(1 To 4), Ab(), ii As Integer
  3. With Me.lstSelector
  4. For i = 0 To 3
  5. A(i + 1) = .List(.ListIndex, i)
  6. Next
  7. End With
  8. i = 2
  9. With Sheets("WIP")
  10. Do While .Cells(i, 1) <> ""
  11. If .Cells(i, "A") = A(1) And .Cells(i, "E") = A(2) And .Cells(i, "G") = A(3) And .Cells(i, "F") = A(4) Then
  12. If IsEmpty(Ar) Then ReDim Ar(1 To 1) Else ReDim Preserve Ar(1 To UBound(Ar) + 1)
  13. '** ­n­«±ÆÄæ¦ì½Ð§ï³o¸Ì ** Customer Location Device Package 'BodySize
  14. Ar(UBound(Ar)) = Array(.Cells(i, "A").Text, .Cells(i, "C").Text, .Cells(i, "D").Text, .Cells(i, "E").Text, _
  15. .Cells(i, "G").Text, .Cells(i, "F").Text, .Cells(i, "K").Text, .Cells(i, "I").Text, .Cells(i, "P").Text)
  16. '** BodySize LC QTY Schedule Oven OutTime
  17. '** Listbox ³Ì¦hÅã¥Ü 9¦C
  18. End If
  19. i = i + 1
  20. Loop
  21. End With
  22. '***********************************
  23. '**frmSelector¤¤ªº²Ä¤G­ÓListBox ±±¨î¶µ
  24. With ListBox1
  25. .Clear
  26. If UBound(Ar) > 1 Then
  27. .List = Application.Transpose(Application.Transpose(Ar))
  28. ElseIf UBound(Ar) = 1 Then
  29. .List = Ar(1)
  30. End If
  31. End With
  32. '***********************************
  33. End Sub
½Æ»s¥N½X
·P®¦ªº¤ß......(¦b³Â»¶®a±Ú°Q½×°Ï.¥Î¤ß¾Ç²ß·|¦³¶i¨Bªº)
¦ý¸ê·½µL­­,«á´©¦³­­,  ¤@¤Ñ1¤¸ªºÃÙ§U,¤H¤H¦³¯à¤O.

TOP

¦^´_ 55# GBKEE

         
    ¦^ª©¤j  §Ú¥i¯à©ñ¦b¤u§@ªí2Åýª©¤j²V²c³o¨â­Ó¸ê°TªºÃö«Y
    ³o¨â­Ó¸ê°T¬O§¹¥þ¨S¦³Ãö«Yªº....
   
    ±z¥Ø«e²Ä¤@­ÓListBoxªº¸ê°T¬O¹ïªº¡A(¬O¨Ì¾Ú"¤u§@ªí2"ªºPackage.BodySize.LC  ¹ïÀ³¦Ü"TR±Æ¾÷&²£¥X")
    ±z§e²{¥X¨Óªº¸ê®Æ¬O¹ïªº
    §Ú«á¨Ó¸ÑÄÀµ¹ª©¤jªº³o±i¹Ï
    ²Ä¤@¨B.........¬O´`°Ýª©¤j¦pªG¨Ì±ø¥ó¿z¿ï§¹«á¡A§e²{¥X¨Óªº³o´Xµ§¸ê®ÆÅã¥Ü¦b²Ä¤@­ÓListBox«á
    ³o´Xµ§¸ê®Æ¬O±q¤u§@ªí2¥h¤ñ¹ï"TR±Æ¾÷&²£¥X"
   
     ²Ä¤G¨B........... ¤U­±¨º¨Ç¸ê°T©M"TR±Æ¾÷&²£¥X"§¹¥þ¨SÃö«Y
     ¥u¬O­n§â¤u§@ªí2¦b"²Ä¤@¨B"¿z§¹³Ñ¤Uªº¸ê°T   
     ¥HPackage.BodySize¬Û¦P¡A¼Æ¶q¥Ñ¤j­P¤p°µ±Æ¦C
        
     ¦A§âµ²ªG±µµÛ©ñ¦b
     ²Ä¤@­ÓListBox"²Ä¤@¨B"°µ¦nªº¸ê°T¤U±µµÛ§e²{  (¤U¤è¸ê°TÀ³¤£¸Ó¦A¥X²{"²Ä¤@¨B"ªº¸ê°T)

TOP

¦^´_ 56# starbox520


    ¦^ª©¤j §Ú«á¨Ó¦³¦Û¤v±Æ¥X¨Ó¤F!!!!
    Åý±zÀYµh¤FXDDD.....
    ½Ð°Ý¬°¤°»òÅã¥Ü¤@µ§¸ê®Æªº®É­Ô·|³o¼Ë©O
   

   
  1. Private Sub lstSelector_³]©w()
  2.     With lstSelector
  3.              ' **¨ú®ø     .MultiSelect = 1            *** MultiSelect ÄÝ©Ê  «ü©wª«¥ó¬O§_±µ¨ü¦h­«¿ï¨ú¡C
  4.        If Not IsEmpty(Sheets("TR±Æ¾÷&²£¥X").Sh_Ar) Then .List = Sheets("TR±Æ¾÷&²£¥X").Sh_Ar
  5.     End With
  6.     With ListBox1  '**frmSelector¤¤ªº²Ä¤G­ÓListBox ±±¨î¶µ
  7.         .ColumnCount = 9
  8.         .ColumnWidths = "60,35,75,40,30,60,30,70,30"
  9.    
  10.     End With
  11. End Sub
  12. Private Sub lstSelector_Change()
  13.     If lstSelector.ListIndex > -1 Then Ex_WIP
  14. End Sub
  15. Private Sub Ex_WIP()
  16.     Dim i As Integer, Ar, A(1 To 4), Ab(), ii As Integer
  17.        With Me.lstSelector
  18.             For i = 0 To 3
  19.                 A(i + 1) = .List(.ListIndex, i)
  20.             Next
  21.        End With
  22.        i = 2
  23.     With Sheets("WIP")
  24.         Do While .Cells(i, 1) <> ""
  25.           '  If .Cells(i, "A") = A(1) And .Cells(i, "E") = A(2) And .Cells(i, "G") = A(3) And .Cells(i, "F") = A(4) Then
  26.             If .Cells(i, "A") = A(1) And .Cells(i, "E") = A(2) And .Cells(i, "G") = A(3) And CStr(.Cells(i, "F")) = A(4) Then
  27.                
  28.                 If IsEmpty(Ar) Then ReDim Ar(1 To 1) Else ReDim Preserve Ar(1 To UBound(Ar) + 1)
  29.          'Åã¥Ü§Ú­nªº¸ê®Æ
  30.          Ar(UBound(Ar)) = Array(.Cells(i, "A").Text, .Cells(i, "C").Text, .Cells(i, "D").Text, .Cells(i, "E").Text, .Cells(i, "G").Text, .Cells(i, "F").Text, .Cells(i, "K").Text, .Cells(i, "I").Text, .Cells(i, "P").Text) 'KÄæ
  31.          
  32.          
  33.                  '** Listbox ³Ì¦hÅã¥Ü 9¦C
  34.             End If
  35.             i = i + 1
  36.         Loop
  37.     End With
  38.     '***********************************
  39.     '**frmSelector¤¤ªº²Ä¤G­ÓListBox ±±¨î¶µ
  40.     With ListBox1
  41.         .Clear
  42.         If UBound(Ar) > 1 Then
  43.              .List = Application.Transpose(Application.Transpose(Ar))
  44.         ElseIf UBound(Ar) = 1 Then
  45.             .List = Ar(1)
  46.         End If
  47.     End With
  48.     '***********************************
  49. End Sub


  50. '******************************
  51. Public Sh_Rng As Range, Sh_Ar
  52. Private Sub Worksheet_SelectionChange(ByVal Target As Range)
  53.     If IsError(Target(1)) Then Unload frmSelector:         Exit Sub
  54.     If (Target(1).Row + 1) Mod 5 = 0 And Target(1) <> "" And Target(1).Column = 5 Then
  55.         Set Sh_Rng = Cells(Target(1).Row, "E")
  56.         Ex_Customer_Package
  57.         If IsEmpty(Sh_Ar) Then MsgBox Sh_Rng & "-" & Sh_Rng(1, 2) & vbLf & "§ä¤£¨ì": Exit Sub
  58.         Unload frmSelector
  59.         frmSelector.Show False
  60.     Else
  61.         Unload frmSelector
  62.     End If
  63. End Sub
  64. Private Sub Ex_Customer_Package()


  65.     Dim i As Integer, ii As Integer, Ar
  66.     Sh_Ar = Ar:    i = 2
  67.     With Sheets("¤u§@ªí2")
  68.         Do While .Cells(i, 1) <> ""
  69.             If .Cells(i, 1) = Sh_Rng And .Cells(i, 2) = Sh_Rng(1, 2) Then
  70.             If IsEmpty(Ar) Then ReDim Ar(1 To 8, 1 To 1) Else ReDim Preserve Ar(1 To 8, 1 To UBound(Ar, 2) + 1)
  71.                 For ii = 1 To 8
  72.                 Ar(ii, UBound(Ar, 2)) = .Cells(i, ii).Text
  73.                 Next
  74.             End If
  75.             i = i + 1
  76.         Loop
  77.     End With
  78.     If IsEmpty(Ar) Then Exit Sub
  79.     Sh_Ar = Application.Transpose(Ar)
  80. End Sub
½Æ»s¥N½X

TOP

¦^´_ 57# starbox520
¦A§âµ²ªG±µµÛ©ñ¦b     ²Ä¤@­ÓListBox"²Ä¤@¨B"°µ¦nªº¸ê°T¤U±µµÛ§e²{  (¤U¤è¸ê°TÀ³¤£¸Ó¦A¥X²{"²Ä¤@¨B"ªº¸ê°T)
­×§ï³o¸Ì
  1. Private Sub Ex_Customer_Package()
  2.     Dim i As Integer, ii As Integer, Ar, xRng As Range, xi As Integer
  3.     Sh_Ar = "":   i = 2
  4.     With Sheets("¤u§@ªí2")
  5.         '¥u¬O­n§â¤u§@ªí2¦b"²Ä¤@¨B"¿z§¹³Ñ¤Uªº¸ê°T ¥HPackage.BodySize¬Û¦P¡A¼Æ¶q¥Ñ¤j­P¤p°µ±Æ¦C ** ­n¥ý°µ±Æ§Ç
  6.         .UsedRange.Sort Key1:=.Cells(1, "H"), Order1:=2, Key2:=.Cells(1, "B"), Order2:=1, Key3:=.Cells(1, "B"), Order3:=1, Header:=True
  7.         '******************************************************************************
  8.         Do While .Cells(i, 1) <> ""
  9.             If .Cells(i, 1) = Sh_Rng And .Cells(i, 2) = Sh_Rng(1, 2) Then
  10.                 xi = xi + 1
  11.                 If xRng Is Nothing Then
  12.                     Set xRng = .Cells(i, 1).Resize(, 8)
  13.                 Else
  14.                     Set xRng = Union(.Cells(i, 1).Resize(, 8), xRng)
  15.                 End If
  16.               End If
  17.             i = i + 1
  18.         Loop
  19.         If xRng Is Nothing Then Exit Sub
  20.         .Range("A2").Resize(xi).EntireRow.Insert
  21.         xRng.Copy .Range("A2")
  22.         xRng.EntireRow.Delete
  23.          Sh_Ar = .Range("A2", .Range("A2").End(xlDown)).Resize(, 4)  ' Resize(, 4) 'AÄæ-DÄæ  ' Resize(, 8) 'AÄæ-HÄæ
  24.     End With
  25. End Sub
½Æ»s¥N½X
½Ð°Ý¬°¤°»òÅã¥Ü¤@µ§¸ê®Æªº®É­Ô·|³o¼Ë©O
­×§ï Private Sub Ex_WIP()
  1. '***********************************
  2.     '**frmSelector¤¤ªº²Ä¤G­ÓListBox ±±¨î¶µ
  3.     With ListBox1
  4.         .Clear
  5.         If UBound(Ar) > 1 Then
  6.              .List = Application.Transpose(Application.Transpose(Ar))
  7.         ElseIf UBound(Ar) = 1 Then
  8.             ReDim AB(0, 8)
  9.             For i = 0 To 8
  10.                 AB(0, i) = Ar(1)(i)
  11.             Next
  12.            .List = AB
  13.         End If
  14.     End With
  15.     '***********************************
½Æ»s¥N½X
·P®¦ªº¤ß......(¦b³Â»¶®a±Ú°Q½×°Ï.¥Î¤ß¾Ç²ß·|¦³¶i¨Bªº)
¦ý¸ê·½µL­­,«á´©¦³­­,  ¤@¤Ñ1¤¸ªºÃÙ§U,¤H¤H¦³¯à¤O.

TOP

¥»©«³Ì«á¥Ñ c_c_lai ©ó 2016-10-29 09:10 ½s¿è

¦^´_ 57# starbox520
°Ñ·Ó
"¿é¤J¸ê®Æ¤ñ¹ï¸ê®Æªí Âà´«¨ì§Oªº¸ê®Æªí #12"
ªº­×¥¿¡C
  1.     '******   By GBKEE  ******
  2.     '**frmSelector¤¤ªº²Ä¤G­ÓListBox ±±¨î¶µ
  3.     With ListBox1
  4.         .Clear
  5.         If UBound(Ar) > 1 Then
  6.              .List = Application.Transpose(Application.Transpose(Ar))
  7.         ElseIf UBound(Ar) = 1 Then
  8.             .AddItem
  9.             For i = 0 To UBound(Ar(1))
  10.                 .List(0, i) = Ar(1)(i)
  11.             Next i
  12.         End If
  13.     End With
  14.     '***********************************
½Æ»s¥N½X

TOP

¦^´_ 59# c_c_lai
  1. Public Sh_Rng As Range, Sh_Ar
  2. Private Sub Worksheet_SelectionChange(ByVal Target As Range)
  3.    
  4.     If IsError(Target(1)) Then Unload frmSelector:         Exit Sub
  5.     If (Target(1).Row + 1) Mod 5 = 0 And Target(1) <> "" And Target(1).Column = 5 Then
  6.         
  7.         Set Sh_Rng = Cells(Target(1).Row, "E")
  8.         Ex_Customer_Package
  9.         
  10.         If IsEmpty(Sh_Ar) Then MsgBox Sh_Rng & "-" & Sh_Rng(1, 2) & vbLf & "§ä¤£¨ì": Exit Sub
  11.         Unload frmSelector
  12.         frmSelector.Show False
  13.     Else
  14.         Unload frmSelector
  15.     End If
  16. End Sub
  17. Private Sub Ex_Customer_Package()

  18.     Dim i As Integer, ii As Integer, Ar
  19.     Sh_Ar = Ar:    i = 2
  20.    
  21.     With Sheets("¤u§@ªí2")
  22.         Do While .Cells(i, 1) <> ""
  23.             If .Cells(i, 1) = Sh_Rng And .Cells(i, 2) = Sh_Rng(1, 2) Then
  24.             
  25.             If IsEmpty(Ar) Then ReDim Ar(1 To 8, 1 To 1) Else ReDim Preserve Ar(1 To 8, 1 To UBound(Ar, 2) + 1)
  26.                 For ii = 1 To 8
  27.                 Ar(ii, UBound(Ar, 2)) = .Cells(i, ii).Text
  28.                 Next
  29.             End If
  30.             i = i + 1
  31.         
  32.         Loop
  33.     End With
  34.    
  35.     If IsEmpty(Ar) Then Exit Sub
  36.     Sh_Ar = Application.Transpose(Ar)
  37.    
  38. End Sub
½Æ»s¥N½X
³o¬O²Ä¤@­Ólistbox
   ¤]¬O¥X²{¤@¼Ëªº±¡§Î
   ¹³³o±¡ªp­n«ç»ò°µ­×§ï©O

TOP

        ÀR«ä¦Û¦b : §Ú­Ì­n°µ¦nªÀ·|ªºÀô«O¡A¤]­n°µ¦n¤º¤ßªºÀô«O¡C
ªð¦^¦Cªí ¤W¤@¥DÃD