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

[µo°Ý] ½Ð±Ð ListBox1.List ¤§ColumnºÃ°Ý?

¦^´_ 1# yangjie
¸Õ¸Õ¬Ý
  1. Private Sub ListBox1_Change()  'ÂI¿ïLISTBOX1
  2. With ListBox1
  3. For i = 1 To 3
  4. Cells(1, i) = .List(.ListIndex, i - 1)
  5. Next
  6. End With
  7. End Sub


  8. Private Sub ListBox1_Exit(ByVal Cancel As MSForms.ReturnBoolean)  'Â÷¶}LISTBOX1
  9. ListBox1.Visible = False
  10. End Sub

  11. Private Sub UserForm_Initialize()  'ªí³æªì©l¤Æ
  12.         Set d = CreateObject("Scripting.Dictionary")
  13.                   With Sheets("°ò¥»¸ê®Æ")
  14.                       For Each a In .Range(.Cells(2, 4), .Cells(65536, 4).End(xlUp))
  15.                           d(a & "") = Array(a.Value, a.Offset(, -3).Value, a.Offset(, -2).Value)
  16.                       Next
  17.                  End With
  18.        If d.Count = 0 Then Exit Sub
  19. With ListBox1
  20. .List = Application.Transpose(Application.Transpose(d.items))
  21. .ColumnCount = 3
  22. .Visible = True
  23. End With
  24. End Sub
½Æ»s¥N½X
¾Ç®üµL²P_¤£®¢¤U°Ý

TOP

        ÀR«ä¦Û¦b : ½_ÁJµ²±o¶V¹¡º¡¡A¶V·|©¹¤U««¡A¤@­Ó¤H¶V¦³¦¨´N¡A´N­n¶V¦³Á¾¨Rªº¯ÝÃÌ¡C
ªð¦^¦Cªí ¤W¤@¥DÃD