- ©«¤l
- 192
- ¥DÃD
- 15
- ºëµØ
- 0
- ¿n¤À
- 194
- ÂI¦W
- 0
- §@·~¨t²Î
- windows
- ³nÅ骩¥»
- office2010
- ¾\ŪÅv
- 20
- ©Ê§O
- ¤k
- µù¥U®É¶¡
- 2016-9-22
- ³Ì«áµn¿ý
- 2020-8-28
|
¦^´_ 56# starbox520
¦^ª©¤j §Ú«á¨Ó¦³¦Û¤v±Æ¥X¨Ó¤F!!!!
Åý±zÀYµh¤FXDDD.....
½Ð°Ý¬°¤°»òÅã¥Ü¤@µ§¸ê®Æªº®ÉÔ·|³o¼Ë©O
- Private Sub lstSelector_³]©w()
- With lstSelector
- ' **¨ú®ø .MultiSelect = 1 *** MultiSelect ÄÝ©Ê «ü©wª«¥ó¬O§_±µ¨ü¦h«¿ï¨ú¡C
- If Not IsEmpty(Sheets("TR±Æ¾÷&²£¥X").Sh_Ar) Then .List = Sheets("TR±Æ¾÷&²£¥X").Sh_Ar
- End With
- With ListBox1 '**frmSelector¤¤ªº²Ä¤GÓListBox ±±¨î¶µ
- .ColumnCount = 9
- .ColumnWidths = "60,35,75,40,30,60,30,70,30"
-
- End With
- End Sub
- Private Sub lstSelector_Change()
- If lstSelector.ListIndex > -1 Then Ex_WIP
- End Sub
- Private Sub Ex_WIP()
- Dim i As Integer, Ar, A(1 To 4), Ab(), ii As Integer
- With Me.lstSelector
- For i = 0 To 3
- A(i + 1) = .List(.ListIndex, i)
- Next
- End With
- i = 2
- With Sheets("WIP")
- Do While .Cells(i, 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
- 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
-
- If IsEmpty(Ar) Then ReDim Ar(1 To 1) Else ReDim Preserve Ar(1 To UBound(Ar) + 1)
- 'Åã¥Ü§Únªº¸ê®Æ
- 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Äæ
-
-
- '** Listbox ³Ì¦hÅã¥Ü 9¦C
- End If
- i = i + 1
- Loop
- End With
- '***********************************
- '**frmSelector¤¤ªº²Ä¤GÓListBox ±±¨î¶µ
- With ListBox1
- .Clear
- If UBound(Ar) > 1 Then
- .List = Application.Transpose(Application.Transpose(Ar))
- ElseIf UBound(Ar) = 1 Then
- .List = Ar(1)
- End If
- End With
- '***********************************
- End Sub
- '******************************
- Public Sh_Rng As Range, Sh_Ar
- Private Sub Worksheet_SelectionChange(ByVal Target As Range)
- If IsError(Target(1)) Then Unload frmSelector: Exit Sub
- If (Target(1).Row + 1) Mod 5 = 0 And Target(1) <> "" And Target(1).Column = 5 Then
- Set Sh_Rng = Cells(Target(1).Row, "E")
- Ex_Customer_Package
- If IsEmpty(Sh_Ar) Then MsgBox Sh_Rng & "-" & Sh_Rng(1, 2) & vbLf & "§ä¤£¨ì": Exit Sub
- Unload frmSelector
- frmSelector.Show False
- Else
- Unload frmSelector
- End If
- End Sub
- Private Sub Ex_Customer_Package()
- Dim i As Integer, ii As Integer, Ar
- Sh_Ar = Ar: i = 2
- With Sheets("¤u§@ªí2")
- Do While .Cells(i, 1) <> ""
- If .Cells(i, 1) = Sh_Rng And .Cells(i, 2) = Sh_Rng(1, 2) Then
- 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)
- For ii = 1 To 8
- Ar(ii, UBound(Ar, 2)) = .Cells(i, ii).Text
- Next
- End If
- i = i + 1
- Loop
- End With
- If IsEmpty(Ar) Then Exit Sub
- Sh_Ar = Application.Transpose(Ar)
- End Sub
½Æ»s¥N½X |
|