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

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

¦^´_ 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

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

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

¦^´_ 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

¦³¨â­Ó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

¦^´_ 10# GBKEE


    ÁÂÁÂGBKEE!
learner

TOP

¦^´_ 9# yliu
  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.     With Sheets("login")
  5.         ³æ¸¹ = .ComboBox1.Value
  6.         Set Rng = .[B9:B19]
  7.         SS = Application.Phonetic(Rng)                                                  'µ²¦X©Ò¦³§Ç¸¹
  8.     End With
  9.    
  10.     With Sheets("final").[A:A]
  11.         If Application.CountIf(.Cells, ³æ¸¹) > 1 Then
  12.             .Replace ³æ¸¹, "=xxx", xlWhole                                               ''Replace ¤èªk
  13.             With .SpecialCells(xlCellTypeFormulas, xlErrors)
  14.                 .Cells = ³æ¸¹
  15.                 For Each C In .Cells                                                     ''¤ñ¹ï¨ì §Ç¸¹ ½ð°£ ¦¹§Ç¸¹
  16.                     If InStr(SS, C.Offset(, 1)) Then SS = Replace(SS, C.Offset(, 1), "") 'Replace ¨ç¼Æ
  17.                     If SS = "" Then Exit Sub
  18.                 Next
  19.             End With
  20.         End If
  21.         For Each E In Rng
  22.             If E = "" Then Exit For
  23.             If InStr(SS, E) Then                                              '¤ñ¹ï¨ì §Ç¸¹
  24.                 g = Application.CountA(.Cells) + 1                            'Ū¨úAø󦳸ê®Æ¼ÆªºÀx¦s®æ¼Æ +1
  25.                 i = Application.CountA(Rng)
  26.                 .Cells(g, "A").Resize(1) = ³æ¸¹
  27.                 .Cells(g, "B").Resize(1, 2) = E.Cells(1).Resize(1, 2).Value
  28.                 .Cells(g, "D").Resize(1, 6) = E.Cells(1, 4).Resize(1, 6).Value
  29.             End If
  30.         Next
  31.     End With
  32. End Sub
½Æ»s¥N½X
·P®¦ªº¤ß......(¦b³Â»¶®a±Ú°Q½×°Ï.¥Î¤ß¾Ç²ß·|¦³¶i¨Bªº)
¦ý¸ê·½µL­­,«á´©¦³­­,  ¤@¤Ñ1¤¸ªºÃÙ§U,¤H¤H¦³¯à¤O.

TOP

¦^´_ 7# GBKEE

GBKEEª©¤j,
©µ¦ù¥t¤@­Ó°ÝÃD, ¨Ï¥ÎListBox ,½Ð°Ý¦p¦óÅý¤w¿ï¨ú¥B¤wCOPY¨ì¤u§@ªí"final"ªº³æ¸¹&§Ç¸¹¤£·|¦A¦¸³Q¿ï¨úCOPY?

ListBox°ÝÃD(2).zip (26.2 KB)
learner

TOP

¦^´_ 7# GBKEE

¯uªº«ÜÁÂÁÂGBKEE, ¥H¤Î¤W¦¸À°¦£ªºHsieh.
·QÂÇ¥ÑExcel VBA¨Ó¸Ñ¨M¤u§@¤W¤@¨ÇÁcº¾ªº¸ê®Æ³B²z,¦ý§Ú¥u¾Ç¹L°ò¥»ªºVBA, ¥\¤O¹ê¦b¤£¨¬,
·P¿Eª©¥D­ÌµL¨pªº¸Ñµª,Åý§Ú¸Ñ¨M¤u§@¤W°ÝÃD.
learner

TOP

¦^´_ 6# yliu
  1. Private Sub CommandButton1_Click()
  2.     Dim g As Integer, E As Range
  3.     g = Application.CountA(Sheets("final").[A:A]) + 1               'Ū¨úAø󦳸ê®Æ¼ÆªºÀx¦s®æ¼Æ +1
  4.     For Each E In Sheets("login").[B9:B19]
  5.         If E = "" Then Exit For
  6.         With Sheets("final")
  7.             .Cells(g, "A") = Sheets("login").ComboBox1.Value
  8.             .Cells(g, "B").Resize(1, 2) = E.Resize(1, 2).Value
  9.             .Cells(g, "D").Resize(1, 6) = E.Cells(1, 4).Resize(1, 6).Value
  10.         End With
  11.         g = g + 1
  12.     Next
  13. End Sub
½Æ»s¥N½X
·P®¦ªº¤ß......(¦b³Â»¶®a±Ú°Q½×°Ï.¥Î¤ß¾Ç²ß·|¦³¶i¨Bªº)
¦ý¸ê·½µL­­,«á´©¦³­­,  ¤@¤Ñ1¤¸ªºÃÙ§U,¤H¤H¦³¯à¤O.

TOP

        ÀR«ä¦Û¦b : «Î¼e¤£¦p¤ß¼e¡C
ªð¦^¦Cªí ¤W¤@¥DÃD