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

[µo°Ý] ¦p¦ó¥i¨Ï d.keys ¦U¶µ­«§@±Æ§Ç°Ê§@?

¦^´_ 1# yangjie
  1. Option Explicit
  2. Sub Ex()
  3.     Dim d As Object, i As Integer, r As Range, A
  4.     'Sheets("¾Ç¥Í¸ê®Æ").Activate
  5.     Set d = CreateObject("Scripting.Dictionary")
  6.     With Sheets("¾Ç¥Í¸ê®Æ")
  7.         For Each r In .Range(.Cells(2, 1), .Cells(65536, 1).End(xlUp))
  8.             d(r.Value) = r.Value
  9.         Next
  10.         ReDim A(1 To d.Count)
  11.         For i = 1 To d.Count
  12.             A(i) = d(Application.WorksheetFunction.Small(d.KEYS, i))
  13.         Next
  14.         .ComboBox1.List = A
  15.      End With
  16.    End Sub
½Æ»s¥N½X
·P®¦ªº¤ß......(¦b³Â»¶®a±Ú°Q½×°Ï.¥Î¤ß¾Ç²ß·|¦³¶i¨Bªº)
¦ý¸ê·½µL­­,«á´©¦³­­,  ¤@¤Ñ1¤¸ªºÃÙ§U,¤H¤H¦³¯à¤O.

TOP

¥»©«³Ì«á¥Ñ GBKEE ©ó 2014-6-20 07:31 ½s¿è

¦^´_ 5# yangjie
¤£­n·Q½ÆÂø¤F,¼Æ¦r,¤¤¤å,­^¤å,¥i¥H ¤@°_¨Ó
  1. Option Explicit
  2. Sub Ex()
  3.     Dim d As Object, r As Range
  4.     'Sheets("¾Ç¥Í¸ê®Æ").Activate
  5.     Set d = CreateObject("Scripting.Dictionary")
  6.     With Sheets("¾Ç¥Í¸ê®Æ")
  7.         For Each r In .Range(.Cells(2, 1), .Cells(65536, 1).End(xlUp))
  8.             d(r.Value) = r.Value
  9.         Next
  10.         With .Cells(1, .Columns.Count).Resize(d.Count)  '¤u§@ªíªº³Ì¥k¤@Äæ
  11.             .Value = Application.WorksheetFunction.Transpose(d.KEYS)
  12.             .Sort Key1:=.Cells(1), Order1:=xlAscending, Header:=xlNo, MatchCase:=True
  13.             .Parent.ComboBox1.List = Application.WorksheetFunction.Transpose(.Value)
  14.             .Clear
  15.         End With
  16.      End With
  17. End Sub
½Æ»s¥N½X
·P®¦ªº¤ß......(¦b³Â»¶®a±Ú°Q½×°Ï.¥Î¤ß¾Ç²ß·|¦³¶i¨Bªº)
¦ý¸ê·½µL­­,«á´©¦³­­,  ¤@¤Ñ1¤¸ªºÃÙ§U,¤H¤H¦³¯à¤O.

TOP

¦^´_ 7# yangjie

   
ÁÙ¬O¨S»¡²M·¡
½Ð¤W¶ÇÀÉ®×»¡©ú§Aºc·Qªº½d¨Ò
·P®¦ªº¤ß......(¦b³Â»¶®a±Ú°Q½×°Ï.¥Î¤ß¾Ç²ß·|¦³¶i¨Bªº)
¦ý¸ê·½µL­­,«á´©¦³­­,  ¤@¤Ñ1¤¸ªºÃÙ§U,¤H¤H¦³¯à¤O.

TOP

        ÀR«ä¦Û¦b : ¤H­nª¾ºÖ¡B±¤ºÖ¡B¦A³yºÖ¡C
ªð¦^¦Cªí ¤W¤@¥DÃD