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

½Ð°Ý¬O§_¦³¤Æ²ªº¤èªk? (¦A¦¸·PÁÂG¤jªºÀ°¦£~§¹¦¨

½Ð°Ý¬O§_¦³¤Æ²ªº¤èªk? (¦A¦¸·PÁÂG¤jªºÀ°¦£~§¹¦¨

¥»©«³Ì«á¥Ñ av8d ©ó 2012-7-25 18:43 ½s¿è
  1. Set d = CreateObject("Scripting.Dictionary")
  2. d("GAS1") = "A"
  3. d("GAS2") = "B"
  4. d("GAS3") = "C"
  5. d("GAS4") = "D"
  6. d("GAS5") = "E"
  7. d("GAS6") = "F"
  8. d("GAS7") = "G"
  9. d("GAS8") = "H"
  10. d("GAS9") = "I"
  11. d("GAS10") = "J"
  12. d("GAS11") = "K"
  13. d("GAS12") = "L"
  14. d("GAS13") = "M"
  15. d("GAS14") = "N"
  16. d("GAS15") = "O"
  17. d("GAS16") = "P"
  18. d("GAS17") = "Q"
  19. d("GAS18") = "R"
  20. L1C = Label1.Caption
  21. L2C = Label2.Caption
  22. L3C = Label3.Caption
  23. L4C = Label4.Caption
  24. TB1 = TextBox1.Value

  25. '¸ê®ÆÂà´«
  26. For i = 1 To 18
  27.     If Me.Controls("OptionButton" & i).Value = True Then
  28.         If i = 1 Then
  29.         Sheets("ÂIÀ\").Cells(Rows.Count, "A").End(3)(2, 1).Resize(1, 7) = Array(L1C, L2C, L3C, L4C, 1, d("GAS" & i), TB1)
  30.         End If
  31.         
  32.         If i = 2 Then
  33.         Sheets("ÂIÀ\").Cells(Rows.Count, "A").End(3)(2, 1).Resize(1, 7) = Array(L1C, L2C, L3C, L4C, 1, d("GAS" & i), TB1)
  34.         End If
  35.         
  36.         If i = 3 Then
  37.         Sheets("ÂIÀ\").Cells(Rows.Count, "A").End(3)(2, 1).Resize(1, 7) = Array(L1C, L2C, L3C, L4C, 1, d("GAS" & i), TB1)
  38.         End If
  39.         
  40.         If i = 4 Then
  41.         Sheets("ÂIÀ\").Cells(Rows.Count, "A").End(3)(2, 1).Resize(1, 7) = Array(L1C, L2C, L3C, L4C, 1, d("GAS" & i), TB1)
  42.         End If
  43.         
  44.         If i = 5 Then
  45.         Sheets("ÂIÀ\").Cells(Rows.Count, "A").End(3)(2, 1).Resize(1, 7) = Array(L1C, L2C, L3C, L4C, 1, d("GAS" & i), TB1)
  46.         End If
  47.         
  48.         If i = 6 Then
  49.         Sheets("ÂIÀ\").Cells(Rows.Count, "A").End(3)(2, 1).Resize(1, 7) = Array(L1C, L2C, L3C, L4C, 1, d("GAS" & i), TB1)
  50.         End If
  51.         
  52.         If i = 7 Then
  53.         Sheets("ÂIÀ\").Cells(Rows.Count, "A").End(3)(2, 1).Resize(1, 7) = Array(L1C, L2C, L3C, L4C, 1, d("GAS" & i), TB1)
  54.         End If
  55.         
  56.         If i = 8 Then
  57.         Sheets("ÂIÀ\").Cells(Rows.Count, "A").End(3)(2, 1).Resize(1, 7) = Array(L1C, L2C, L3C, L4C, 1, d("GAS" & i), TB1)
  58.         End If
  59.         
  60.         If i = 9 Then
  61.         Sheets("ÂIÀ\").Cells(Rows.Count, "A").End(3)(2, 1).Resize(1, 7) = Array(L1C, L2C, L3C, L4C, 1, d("GAS" & i), TB1)
  62.         End If
  63.         
  64.         If i = 10 Then
  65.         Sheets("ÂIÀ\").Cells(Rows.Count, "A").End(3)(2, 1).Resize(1, 7) = Array(L1C, L2C, L3C, L4C, 1, d("GAS" & i), TB1)
  66.         End If
  67.         
  68.         If i = 11 Then
  69.         Sheets("ÂIÀ\").Cells(Rows.Count, "A").End(3)(2, 1).Resize(1, 7) = Array(L1C, L2C, L3C, L4C, 1, d("GAS" & i), TB1)
  70.         End If
  71.         
  72.         If i = 12 Then
  73.         Sheets("ÂIÀ\").Cells(Rows.Count, "A").End(3)(2, 1).Resize(1, 7) = Array(L1C, L2C, L3C, L4C, 1, d("GAS" & i), TB1)
  74.         End If
  75.         
  76.         If i = 13 Then
  77.         Sheets("ÂIÀ\").Cells(Rows.Count, "A").End(3)(2, 1).Resize(1, 7) = Array(L1C, L2C, L3C, L4C, 1, d("GAS" & i), TB1)
  78.         End If
  79.         
  80.         If i = 14 Then
  81.         Sheets("ÂIÀ\").Cells(Rows.Count, "A").End(3)(2, 1).Resize(1, 7) = Array(L1C, L2C, L3C, L4C, 1, d("GAS" & i), TB1)
  82.         End If
  83.         
  84.         If i = 15 Then
  85.         Sheets("ÂIÀ\").Cells(Rows.Count, "A").End(3)(2, 1).Resize(1, 7) = Array(L1C, L2C, L3C, L4C, 1, d("GAS" & i), TB1)
  86.         End If
  87.         
  88.         If i = 16 Then
  89.         Sheets("ÂIÀ\").Cells(Rows.Count, "A").End(3)(2, 1).Resize(1, 7) = Array(L1C, L2C, L3C, L4C, 1, d("GAS" & i), TB1)
  90.         End If
  91.         
  92.         If i = 17 Then
  93.         Sheets("ÂIÀ\").Cells(Rows.Count, "A").End(3)(2, 1).Resize(1, 7) = Array(L1C, L2C, L3C, L4C, 1, d("GAS" & i), TB1)
  94.         End If
  95.         
  96.         If i = 18 Then
  97.         Sheets("ÂIÀ\").Cells(Rows.Count, "A").End(3)(2, 1).Resize(1, 7) = Array(L1C, L2C, L3C, L4C, 1, d("GAS" & i), TB1)
  98.         End If
  99.     End If
  100. Next i
½Æ»s¥N½X

¦^´_ 1# av8d
  1. Sub Ex()
  2.     Dim d As Object, i As Integer
  3.     Set d = CreateObject("Scripting.Dictionary")
  4.     L1C = Label1.Caption
  5.     L2C = Label2.Caption
  6.     L3C = Label3.Caption
  7.     L4C = Label4.Caption
  8.     TB1 = TextBox1.Value
  9.     For i = 1 To 18
  10.         d("GAS" & i) = Chr(64 + i)   '¨Ï¥Î¦r¤¸
  11.         If Me.Controls("OptionButton" & i).Value = True Then
  12.             Sheets("ÂIÀ\").Cells(Rows.Count, "A").End(3)(2, 1).Resize(1, 7) = Array(L1C, L2C, L3C, L4C, 1, d("GAS" & i), TB1)
  13.         End If
  14.     Next
  15. End Sub
½Æ»s¥N½X

TOP

¥»©«³Ì«á¥Ñ av8d ©ó 2012-7-25 00:23 ½s¿è

¦^´_ 2# GBKEE


    G¤j¦A¦¸¥´ÂZ~¦pªG¬O³o¼ËA~R¬O¤£³W«h¤¤¤å~¥Î­^¤å¼È¥N
d("GAS1") = "A"
d("GAS2") = "B"
d("GAS3") = "C"
d("GAS4") = "D"
d("GAS5") = "E"
d("GAS6") = "F"
d("GAS7") = "G"
d("GAS8") = "H"
d("GAS9") = "I"
d("GAS10") = "J"
d("GAS11") = "K"
d("GAS12") = "L"
d("GAS13") = "M"
d("GAS14") = "N"
d("GAS15") = "O"
d("GAS16") = "P"
d("GAS17") = "Q"
d("GAS18") = "R"
L1C = Label1.Caption
L2C = Label2.Caption
L3C = Label3.Caption
L4C = Label4.Caption
TB1 = TextBox1.Value

'¸ê®ÆÂà´«
For i = 1 To 18
    If Me.Controls("OptionButton" & i).Value = True Then
        Sheets("ÂIÀ\").Cells(Rows.Count, "A").End(3)(2, 1).Resize(1, 7) = Array(L1C, L2C, L3C, L4C, 1, d("GAS" & i), TB1)
    End If
Next i

For i = 19 To 36
    If Me.Controls("OptionButton" & i).Value = True Then
        Sheets("ÂIÀ\").Cells(Rows.Count, "A").End(3)(2, 1).Resize(1, 7) = Array(L1C, L2C, L3C, L4C, 1, d("GAS" & i), TB1)
    End If
Next i

d("GAS19")¨ìd("GAS36")©Md("GAS1")¨ìd("GAS18")¤@¼Ë
d("GAS1")µ¥©ód("GAS19")
d("GAS2")µ¥©ód("GAS20")
¥H¦¹Ãþ±À
§Ú¸Ó¦p¦ó¼g¤~¤£¥Î¤@ª½­«½Æ¼g?

TOP

¦^´_ 3# av8d
  1. Option Explicit
  2. Sub Ex()
  3.     Dim d As Object, i As Integer
  4.     Set d = CreateObject("Scripting.Dictionary")
  5.     L1C = Label1.Caption
  6.     L2C = Label2.Caption
  7.     L3C = Label3.Caption
  8.     L4C = Label4.Caption
  9.     TB1 = TextBox1.Value
  10.     For i = 1 To 18
  11.         d("GAS" & i) = Sheet1.Cells(i, "A")  '¤£³W«h¤¤¤å¦b A1 - A18
  12.         If Me.Controls("OptionButton" & i).Value = True Then
  13.             Sheets("ÂIÀ\").Cells(Rows.Count, "A").End(3)(2, 1).Resize(1, 7) = Array(L1C, L2C, L3C, L4C, 1, d("GAS" & i), TB1)
  14.         End If
  15.     Next
  16. End Sub
½Æ»s¥N½X

TOP

        ÀR«ä¦Û¦b : ¦³´¼¼z¤~¯à¤À¿ëµ½´c¨¸¥¿¡F¦³Á¾µê¤~¯à«Ø¥ß¬üº¡¤H¥Í¡C
ªð¦^¦Cªí ¤W¤@¥DÃD