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

[µo°Ý] ²Õ¦X¤è¶ô¬ÛÃö°ÝÃD

[µo°Ý] ²Õ¦X¤è¶ô¬ÛÃö°ÝÃD

¦p¦ó¦bsheet3¤u§@ªírange("E2:I7")¤¤·s¼W30­ÓcomboBox(ÂŦâ°Ï°ì)¡A¨Ã¥B·s¼Wªº½d³ò·|¦]"«È¤á¯u¥¿»Ý¨D"»P"«~½è¯S©Ê"¿é¤J­Ó¼Æ¤£¦P¦Ó§ïÅܽd³ò¡A
¨Ò¦p:7¶µ«È¤á»Ý¨D¡B3¶µ«~½è¯S©Ê¡A¦brange("E2:G8")¤¤·s¼W21­ÓcomboBox
sheet3.range("A1").valueªí¥Ü"«È¤á¯u¥¿»Ý¨D"ªº­Ó¼Æ­È
sheet3.range("A2").valueªí¥Ü"«~½è¯S©Ê"ªº­Ó¼Æ­È

7-7.rar (27.82 KB)

Ä_Ä_

¥»©«³Ì«á¥Ñ Hsieh ©ó 2012-5-4 16:17 ½s¿è

¦^´_ 1# caichen3


¤U©Ô²M³æ¤º®e¬O¨º¨Ç?
§@¥Î®É¾÷?°ÝÃD½Ð´y­z²M·¡
¥ý¥H§ó§ïSheet3!A1:A2¼Æ­È¬°¨Ò¡A¦Û¤v¨Ì»Ý¨D§ó§ï
  1. Private Sub Worksheet_Change(ByVal Target As Range)
  2. Dim Ar()
  3. If Intersect(Target, [A1:A2]) Is Nothing Then Exit Sub
  4. Application.ScreenUpdating = False
  5. r = [A1]  '¦C¼Æ
  6. K = [A2]  'Äæ¼Æ
  7.     For Each C In Sheet1.[B2].Resize(r, 1)  '¼W¥[²M³æ¤º®e(«È¤á¯u¥¿»Ý¨D)
  8.       ReDim Preserve Ar(s)
  9.       Ar(s) = C.Value
  10.       s = s + 1
  11.     Next
  12.     For Each C In Sheet2.[E2].Resize(, K) '¼W¥[²M³æ¤º®e(«~½è¯S©Ê)
  13.       ReDim Preserve Ar(s)
  14.       Ar(s) = C.Value
  15.       s = s + 1
  16.     Next

  17. Me.OLEObjects.Delete
  18. For i = 1 To r
  19.     For j = 1 To K
  20.     Set a = Cells(i + 1, j + 4)
  21.     With Me.OLEObjects.Add(ClassType:="Forms.ComboBox.1")  '´¡¤Jª«¥ó
  22.     .Top = a.Top
  23.     .Left = a.Left
  24.     .Height = a.Height
  25.     .Width = a.Width
  26.     .LinkedCell = a.Address
  27.     .Object.List = Ar
  28.     End With
  29.     Next
  30. Next
  31. Application.ScreenUpdating = True
  32. End Sub
½Æ»s¥N½X
¾Ç®üµL²P_¤£®¢¤U°Ý

TOP

¦^´_ 2# Hsieh
·PÁ¢֤j¤jªº¼ö¤ß¦^´_¡G¡^
§@¥Î®É¾÷: sheet1¿é¤J§¹«È¤á»Ý¨D«ö¤U"½T©w"(m­Ó«È¤á»Ý¨D)¡Asheet2¿é¤J§¹«~½è¯S©Ê«ö¤U"½T©w"«á(n­Ó«~½è¯S©Ê),
                   sheet3´N±q[B2]²£¥Ím¦C,±q[E1]²£¥Ín¦æ,¨Ã¥B±q[E2]²£¥Ím*n­Ó²Õ¦X¤è¶ô
²Õ¦X¤è¶ô¤º®e: 9 ¡A 6¡A3
Ä_Ä_

TOP

        ÀR«ä¦Û¦b : ¡i®É¶¡µLªk¾B¾×¡j©È®É¶¡®ø³u¡Aªá¤F³\¦h¤ß¦å¡A·QºÉ¦U¦¡¤èªk­n¾B¾×®É¶¡¡Aµ²ªG¬O¡G®ö¶O¤F§ó¦h®É¶¡¡A¥B¤@µL©Ò¦¨¡I
ªð¦^¦Cªí ¤W¤@¥DÃD