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

[­ì³Ð] 3+2¶l»¼°Ï¸¹¬d¸ß

[­ì³Ð] 3+2¶l»¼°Ï¸¹¬d¸ß

¥»©«³Ì«á¥Ñ lpk187 ©ó 2015-6-3 17:48 ½s¿è

³Ìªñ¶¢¨ÓµL¨Æ¡A¾Ç²ß¦r¨åªº¥Îªk¡C¦Ó¼g¤F³o­Óµ{¦¡¡A­è¦n¤½¥q¤]¦³¥Î¨ì¡A¤À¨Éµ¹¦U¦ì¡I
¤]½Ð¦U¦ì¤j¤jµ¹¤©«ü±Ð
3+2½X¶l»¼°Ï¸¹¬d¸ß.rar (775.01 KB)

¦^´_ 2# GBKEE


    ·PÁª©¤jªº­×¥¿¡IÁÂÁ¡I

TOP

¦^´_ 1# lpk187
°õ¦æªí³æ¦U¿¤¥«ªº¦æ¬F°Ï¦p¦³¬Û¦P¦WºÙ,§ë»¼µó¹D·|¦³¿ù»~.
§Ú¦í°ò¶©¤@²´¬Ý¥X¤¤¤s°Ï¨S¦³ ¤@¦¿µó. ¤¤¥¿°Ï¨S¦³¥Å¬w¸ô3¬q






À°§A­×§ï¤@¤U
  1. Dim Sh As Worksheet, d As Object, d2 As Object, d3 As Object
  2. Private Sub UserForm_Initialize()
  3.     Dim i As Single, Rng As Range
  4.     Set Sh = Sheets("3+2¶l»¼°Ï¸¹ÀÉ")
  5.     Set d = CreateObject("scripting.dictionary")
  6.     Set Rng = Sh.Cells(2, "b")
  7.     Do While Rng <> ""
  8.         If d.exists(Rng.Value) = False Then
  9.             Set d(Rng.Value) = Rng
  10.         Else
  11.             Set d(Rng.Value) = Union(Rng, d(Rng.Value))
  12.         End If
  13.         Set Rng = Rng.Offset(1)
  14.     Loop
  15.     ComboBox1.List = d.KEYS
  16.     TextBox1 = ""
  17. End Sub
  18. Private Sub ComboBox1_Change()
  19.     Dim R As Range
  20.     TextBox1 = ""
  21.     Set d2 = CreateObject("scripting.dictionary")
  22.     For Each R In d(ComboBox1.Value).Offset(, 1).Cells
  23.         If d2.exists(R.Value) = False Then
  24.             Set d2(R.Value) = R
  25.         Else
  26.             Set d2(R.Value) = Union(R, d2(R.Value))
  27.         End If
  28.     Next
  29.     ComboBox2.Clear
  30.     ComboBox2.List = d2.KEYS
  31. End Sub

  32. Private Sub ComboBox2_Change()
  33.     Dim R As Range
  34.     TextBox1 = ""
  35.     ComboBox3.Clear
  36.     Set d3 = CreateObject("scripting.dictionary")
  37.     If ComboBox2.ListIndex > -1 Then
  38.         For Each R In d2(ComboBox2.Value).Offset(, 1).Cells
  39.             If d3.exists(R.Value) = False Then
  40.                 Set d3(R.Value) = R
  41.             Else
  42.                 Set d3(R.Value) = Union(R, d3(R.Value))
  43.             End If
  44.         Next
  45.         ComboBox3.List = d3.KEYS
  46.     End If
  47. End Sub
  48. Private Sub ComboBox3_Change()
  49.     TextBox1 = ""
  50.     If ComboBox3.ListIndex > -1 Then TextBox1.Text = Sh.Cells(d3(ComboBox3.Value).Row, "A")
  51.     'ListIndex = -1 ­È¤£¦bList¤¤
  52. End Sub
  53. Private Sub CommandButton1_Click()
  54.     Dim Rng As Range
  55.     If ComboBox3.ListIndex = -1 Then Exit Sub
  56.     With Sheets("¤u§@ªí1")
  57.         Set Rng = .Range("A" & .Cells(.Rows.Count, 1).End(xlUp).Row + 1)
  58.     End With
  59.     With Rng
  60.         .Cells = TextBox1.Text
  61.         .Cells(1, "b") = ComboBox1.Value
  62.         .Cells(1, "c") = ComboBox2.Value
  63.         .Cells(1, "d") = ComboBox3.Value
  64.         .Cells(1, "e") = d3(ComboBox3.Value).Cells(1, "b")
  65.     End With
  66. End Sub
½Æ»s¥N½X
·P®¦ªº¤ß......(¦b³Â»¶®a±Ú°Q½×°Ï.¥Î¤ß¾Ç²ß·|¦³¶i¨Bªº)
¦ý¸ê·½µL­­,«á´©¦³­­,  ¤@¤Ñ1¤¸ªºÃÙ§U,¤H¤H¦³¯à¤O.

TOP

        ÀR«ä¦Û¦b : ÀR§¤±`®¦¤v¹L¡B¶¢½Í²ö½×¤H«D¡C
ªð¦^¦Cªí ¤W¤@¥DÃD