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

[µo°Ý] (ÁÂÁ®¦®v­Ì¡A7/4§¹¦¨) Ãö©ó¦Û­qªí³æTextBox¿é¤JÃöÁä¦r¥X²{¸ê®Æ(ªþ½d¨Ò)

¥»©«³Ì«á¥Ñ av8d ©ó 2012-6-28 22:40 ½s¿è

¦^´_ 20# GBKEE


    ¥Ñ©ó§ÚµLªk¨Ï¥ÎOption Explicit¦]¬°§Ú¤j¦h¼Æ¤º®e³£¨S+Option Explicit
¾É­PÅܼƧڨS¦³¤@­Ó¤@­Ó¥h³]©w~¤@ª½¥X¿ù~©Ò¥H§Ú¥´ºâ§ï¨ìModule
µM«á¥ÎCallªº¤è¦¡©I¥s~¥i¬O·|¥X¿ù~¦bModuleªº¼gªk¬O§_¤]®t²§?

Option Explicit
Dim d As Object
Sub UFI()
    Dim A As Range
    Set d = CreateObject("Scripting.Dictionary")
    With ActiveSheet
        For Each A In .Range("d2", .[d2].End(xlDown))
          d(A.Value) = IIf(d(A.Value) = "", A.Offset(, 1).Value, d(A.Value) & "," & A.Offset(, 1))
        Next
        ComboBox1.List = d.KEYS
    End With
End Sub
Sub CBC()
    If ComboBox1.ListIndex > -1 Then
        ComboBox2.List = Split(d(ComboBox1.Value), ",")
        ComboBox2.Value = ComboBox2.List(0)
    End If
End Sub

§Ú§Q¥ÎCall©I¥sUFI©ÎCBC³£·|¥X¿ù~¥d¨ìÅܼưÝÃD~

TOP

¦^´_ 21# av8d

¤@¯ë¼Ò²Õ¤º©I¥sªí³æª«¥ó¡A¥²¶·«ü©úª«¥ó
¨Ò¦p¡GUserForm1.ComboBox1
¾Ç®üµL²P_¤£®¢¤U°Ý

TOP

¦^´_ 22# Hsieh


    ÁÂÁ¤j¤j~
§Ú«á¨Ó§R°£Option Explicit~´N¥i¥H¤F~
¦]¬°¥ý«e§Ú¨S¦³§â¨C­ÓÅܼƳ£¥[¤WDim«Å§iªº°Ê§@~
¦]¬°«Å§iºØÃþ§ÚÁÙ¤£¼ô±x~©Ò¥H´N¨S¥h«Å§i@@

TOP

¦^´_ 21# av8d
¥Ñ©ó§ÚµLªk¨Ï¥ÎOption Explicit¦]¬°§Ú¤j¦h¼Æ¤º®e³£¨S+Option Explicit ¾É­PÅܼƧڨS¦³¤@­Ó¤@­Ó¥h³]©w~¤@ª½¥X¿ù~
³o¬O¤£¦nªº²ßºD,­n¥ß§Y§ï±¼
¦p¹Ï ·|¦b·s¼Ò²Õ¤¤¦Û°Ê¦b³»ºÝ¥[¤J  Option Explicit

TOP

¥»©«³Ì«á¥Ñ av8d ©ó 2012-7-4 15:19 ½s¿è

¦^´_ 18# GBKEE

­ìµª®×³Ì«áµ²ªG¬O·í¿ï¨ìDÄæCBªº¦­À\~EÄæCB¥uÅã¥Ü½Þ¦×¤û¦×
¦ý¬O²{¦bDÄ檺ªºCBªº¦­À\¤ºEÄæCBªº½Þ¦×¦³¨âµ§§Æ±æ¥uÅã¥Ü¤@µ§~¦p¤U
   
­YD1=¦­À\  D2=¤ÈÀ\  D3=¦­À\  D4=¦­À\
­YE1=½Þ¦×  E2=Âû¦×  E3=¤û¦×  E4=½Þ¦×

E1©ME4­«½Æ~¥uÅã¥Ü¤@µ§~¸Ó¦p¦óµ²¦X©O?

TOP

¦^´_ 25# av8d
  1. ption Explicit
  2. Dim d As Object
  3. Private Sub UserForm_Initialize()
  4.     Dim A As Range, W As String
  5.     Set d = CreateObject("Scripting.Dictionary")
  6.     With ActiveSheet
  7.         For Each A In .Range("d2", .[d2].End(xlDown))
  8.             If d(A.Value) = "" Then
  9.                 d(A.Value) = A.Offset(, 1).Value
  10.             Else
  11.                 W = "," & d(A.Value) & ","   '¦r¨åª«¥ó¤º®e«e«á¥[¤W ,
  12.                 If InStr(W, "," & A.Offset(, 1) & ",") = 0 Then d(A.Value) = d(A.Value) & "," & A.Offset(, 1)
  13.                 'InStr(w, "," & A.Offset(, 1) & ",") = 0 ¤ñ¹ï¦r¨åª«¥ó¤º®e¦³µLA.Offset(, 1)ªº¦r¦ê
  14.             End If
  15.         Next
  16.         ComboBox1.List = d.KEYS
  17.     End With
  18. End Sub
½Æ»s¥N½X

TOP

¥»©«³Ì«á¥Ñ av8d ©ó 2012-7-5 13:55 ½s¿è

¦^´_ 26# GBKEE


    ¹J¨ì¥t¤@­Ó°ÝÃD~½Ð±Ð¤j¤j

¦pªG§Ú·Q¹ïAÄæ°µ¬Û¦P½d¨Ò
¦ý¬O§Ú¥u·Q¨ú¦~Year()­«½Æ«h¥uÅã¥Ü¤@µ§

¨Ò¦p:
A1=2012/06/25 A2=2012/10/10 A3=2013/8/8
©Ò¥H¥u¨ú¦~«h¬OA1=2012 A2=2012 A3=2013
­«½Æ«h¥uÅã¥Ü¤@µ§©Ò¥HComboBox1«h·|¥X²{2012©M2013ªº¿ï¶µ¥i¥H¿ï¾Ü

§Ú­×§ï¤F¤@¤U6¼Ó¤j¤jªºµ{¦¡¦p¤U
    Dim d As Object, A
    Set d = CreateObject("Scripting.Dictionary")
    With ActiveSheet
        For Each A In .Range("a2", .[a2].End(xlDown))
          d(Year(A.Value)) = ""
        Next A
        ComboBox1.List = Application.Transpose(d.KEYS)
    End With
§Y¥i§¹¦¨~¤£ª¾³o¼Ë¬O§_¥i¦æ!?

TOP

¦^´_ 27# av8d
§Y¥i§¹¦¨~¤£ª¾³o¼Ë¬O§_¥i¦æ!?
§A¸Õ¤F¶Ü? ¦³¹F¨ì§Aªº®ÄªG´N¥i¥Hªü.

TOP

¥»©«³Ì«á¥Ñ av8d ©ó 2012-7-11 12:09 ½s¿è

¦^´_ 28# GBKEE


    G¤j~ÁÂÁ§A~±z¼gªº³£¥i¥H¨Ï¥Î~

TOP

¦^´_ 29# av8d
¦^´_ 28# GBKEE
ªþ¤W§Ú­×¥¿«á¤§ GBKEE ¤j¤jªº½d¨Ò¨Ñ§A°Ñ¦Ò¡G
ÃöÁä¦r¿é¤J½d¨Ò(GBKEE).rar (15.39 KB)

TOP

        ÀR«ä¦Û¦b : ¤@­Ó¤Hªº§Ö¼Ö¡D¤£¬O¦]¬°¥L¾Ö¦³±o¦h¡A¦Ó¬O¦]¬°¥L­p¸û±o¤Ö¡C
ªð¦^¦Cªí ¤W¤@¥DÃD