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

[µo°Ý] ½Æ»s¸ê®ÆÂà¼g¨ì¥t¤@¤u§@ªí

¦^´_ 10# GBKEE


    ÁÂÁÂGBKEE!
learner

TOP

¦³¨â­ÓListBox, ¤@­Ó¬O³æ¸¹(ListBox2), ¤@­Ó¬O³æ¸¹©ú²Ó(ListBox1),³£¥i¥H½Æ¿ï, ½Ð¸Ôªþ¥ó ListBox°ÝÃD(2).zip (23.22 KB)
·Q½Ð°Ýª©¤W°ª¤â, ListBox2ªºµ{¦¡¬O§_¦³§ó¦nªº¼gªk?
§Ú¥Ø«e¼gªk¬O:
Private Sub ListBox2_Change()
Dim lrow, irow, ai As Integer
Sheets("login").ListBox1.Clear
[A9:E19] = ""
With ListBox2

For lrow = 0 To .ListCount - 1

  If .Selected(lrow) Then
   With Sheets(Sh)
     ai = 2
     Do While .Cells(ai, "A") <> ""
If .Cells(ai, "A") = ListBox2.List(lrow, 0) Then
      With ListBox1
        .AddItem
        irow = .ListCount
       .List(irow - 1, 0) = Sheets(Sh).Cells(ai, "A")
       .List(irow - 1, 1) = Sheets(Sh).Cells(ai, "B")
       .List(irow - 1, 2) = Sheets(Sh).Cells(ai, "C")
       .List(irow - 1, 3) = Sheets(Sh).Cells(ai, "D")
       .List(irow - 1, 4) = Sheets(Sh).Cells(ai, "E")
        End With
     End If
    ai = ai + 1
    Loop
   End With
End If
Next
End With
Application.EnableEvents = True
End Sub
learner

TOP

¦^´_ 12# yliu
®M¥Î§A­ì¥»ªºÀɮסA¨Ã¥[¥Hµyµy­×§ï¡A¬Ý¬Ý¬O§_²Å¦X§Aªº»Ý¨D¡C
½ÐÆ[¹î ThisWorkbook »P Sheet1 (login) ¶¡¤§¤¬°Ê¡C
P.S.  ¥tÃB¥~¼W¥[¤F Checkbox ªºÀ³¥Î¡A¨Ñ°Ñ¦Ò¡C
ListBox ½Æ»s¸ê®ÆÂà¼g¨ì¥t¤@¤u§@ªí.rar (41.65 KB)

TOP

¦^´_ 13# c_c_lai

¤£¦n·N«ä,  §Ú­nªº¬O2­ÓListBox³£¯à½Æ¿ï, ¤]´N¬O³æ¸¹ªºListBox½Æ¿ï§¹«á(¸ó³æ¸¹,¤£¬O³æ¤@), ¨ä©ú²Ó³£·|¥X²{¦b©ú²ÓªºListBox, µM«á¦A¥h¤Ä¿ï­nªº§Ç¸¹©ú²Ó.
§Úªº¼gªk¤Ó¦h¼h,§Æ±æ¯à²¤Æ. ¤£ª¾¬O§_´£¨Ñ¸û¦nªº¼gªk.Àɮ׬O¬Q¤Ñ¶K¤Wªº¨º­ÓÀÉ®×. ÁÂÁÂ~
learner

TOP

¦^´_ 14# yliu
§A­nªº¬O °é°_¨Óªº³¡¤À¡Aªþ¤Wªº¬O¥þ³¡ªº (ComboBox¡BCheckBox¡BListBox1¡BListBox2)À³¥Î¡C
½Ð°Ñ¦Ò¸Ì­±¬ÛÃöªºµ{¦¡½X¡G

TOP

¦^´_ 15# c_c_lai
¤£¦n·N«ä, ²{¦bµLªk¤W¶Ç¹Ï¤ù, ¥u¯à¥ý¥Î¤å¦r±Ô­z
§Ú·Q¥u­n¥Î2­ÓListBox §¹¦¨¿ï¶µ, ¤Ó¦hª«¥ó·|¦ûªÅ¶¡,§Úªº°µªk¬O:
³æ¸¹ªº[List Box2] ¥i¤@¦¸¤Ä¿ï³æ¸¹TW-1301001¤ÎTW1301002
©ú²Óªº[List Box1]´N·|¥X²{¦@4µ§§Ç¸¹©ú²ÓTW-1301001 001, TW-1301001 002, TW-1301001 003, TW-1301002 001
¥u¬O§Æ±æ·Q¥Î§Oªº¼gªk²¤Æ§Úªº¦h¼h°j°é§PÂ_.
learner

TOP

¦^´_ 16# yliu
¤WÀYªþ¤WªºÀɮ׬O§¹¥þ²[»\§Aªº ListBox°ÝÃD(2).zip ªº»Ý¨D¡A
­ì¥»¬O·QÅý§A¦Û¤v¹Á¸Õ±q¤¤±¸¨ú¥X¨Ó¡A©Ò¥H¤~·|¤W¶Ç¹Ï¤ù§i¶D§A°é¥Xªº³¡¤À¡A
¥¦¬O¤ä«Ü¦nªº½d¨Ò¡C·Q·QÁÙ¬O§â¨ä¥¦³¡¤À(®×¨Ò)²¾°£¡A¨ú¥X§A­nªº»Ý¨D¡C

ListBoxes ½Æ»s¸ê®ÆÂà¼g¨ì¥t¤@¤u§@ªí.rar (42.64 KB)

TOP

¥»©«³Ì«á¥Ñ c_c_lai ©ó 2013-8-30 15:25 ½s¿è

¦^´_ 16# yliu
#17 ¼Ó¬O³æ¿ï¡A§A¤]¥i¥H§ï¬°¦h¿ï¡G
  1. Private Sub CommandButton1_Click()
  2.     Dim g As Integer, E As Range, C As Range, ³æ¸¹ As String, SS As String, Rng As Range
  3.     Dim i As Integer
  4.    
  5.     With Sheets("login")
  6.         ³æ¸¹ = .ListBox2.Value
  7.         Set Rng = .[B14:B24]
  8.         SS = Application.Phonetic(Rng)                               '  µ²¦X©Ò¦³§Ç¸¹
  9.     End With
  10.    
  11.     With Sheets("final").[A:A]
  12.         If Application.CountIf(.Cells, ³æ¸¹) > 1 Then
  13.             .Replace ³æ¸¹, "=xxx", xlWhole                           '  Replace ¤èªk
  14.             With .SpecialCells(xlCellTypeFormulas, xlErrors)
  15.                 .Cells = ³æ¸¹
  16.                 For Each C In .Cells                                 '  ¤ñ¹ï¨ì §Ç¸¹ ½ð°£ ¦¹§Ç¸¹
  17.                     If InStr(SS, C.Offset(, 1)) Then SS = Replace(SS, C.Offset(, 1), "") ' Replace ¨ç¼Æ
  18.                     If SS = "" Then Exit Sub
  19.                 Next
  20.             End With
  21.         End If
  22.         
  23.         For Each E In Rng
  24.             If E = "" Then Exit For
  25.             
  26.             If InStr(SS, E) Then                                      '  ¤ñ¹ï¨ì §Ç¸¹
  27.                 g = Application.CountA(.Cells) + 1                    '  Åª¨úAø󦳸ê®Æ¼ÆªºÀx¦s®æ¼Æ +1
  28.                 i = Application.CountA(Rng)
  29.                
  30.                 .Cells(g, "A").Resize(1) = ³æ¸¹
  31.                 .Cells(g, "B").Resize(1, 2) = E.Cells(1).Resize(1, 2).Value
  32.                 .Cells(g, "D").Resize(1, 6) = E.Cells(1, 4).Resize(1, 6).Value
  33.             End If
  34.         Next
  35.     End With
  36.    
  37.     With Sheets("login")
  38.         .ListBox1.Clear
  39.         .[A14:E24] = ""
  40.         .ListBox2 = ""
  41.     End With
  42. End Sub
½Æ»s¥N½X
¼W¥[³Ì«á¤­¦æ (37 ~ 41)¡C
  1. Private Sub ListBox2_Change()
  2.     Dim i As Integer, R As Integer
  3.    
  4.     '  ListBox1.Clear
  5.     Sheets("login").[A14:E24] = ""
  6.       
½Æ»s¥N½X
±N ListBox1.Clear Remark °_¨Ó¡C

TOP

¦^´_  c_c_lai
¤£¦n·N«ä, ²{¦bµLªk¤W¶Ç¹Ï¤ù, ¥u¯à¥ý¥Î¤å¦r±Ô­z
§Ú·Q¥u­n¥Î2­ÓListBox §¹¦¨¿ï¶µ, ¤Ó¦hª«¥ó ...
yliu µoªí©ó 2013-8-30 13:19


³o«K¬O§A­nªº (¦h¿ï)

TOP

¦^´_ 19# c_c_lai
©êºp, ¨Ì§A©Ò´£¨Ñªº,¤£¬O§Ú­nªº½Æ¿ï. §Ú·QÀ³¸Ó¬O§Úªí¹Fªº·N«ä¤£°÷²M·¡,
§Ú­nªº½Æ¿ï¦p¹Ï;
learner

TOP

        ÀR«ä¦Û¦b : ¤ß¤¤±`¦sµ½¸Ñ¡B¥]®e¡B·P«ä¡Bª¾¨¬¡B±¤ºÖ¡C
ªð¦^¦Cªí ¤W¤@¥DÃD