- ©«¤l
- 4901
- ¥DÃD
- 44
- ºëµØ
- 24
- ¿n¤À
- 4916
- ÂI¦W
- 249
- §@·~¨t²Î
- Windows 7
- ³nÅ骩¥»
- Office 20xx
- ¾\ŪÅv
- 150
- ©Ê§O
- ¨k
- ¨Ó¦Û
- ¥x¥_
- µù¥U®É¶¡
- 2010-4-30
- ³Ì«áµn¿ý
- 2024-11-17
|
¥»©«³Ì«á¥Ñ Hsieh ©ó 2012-5-4 16:17 ½s¿è
¦^´_ 1# caichen3
¤U©Ô²M³æ¤º®e¬O¨º¨Ç?
§@¥Î®É¾÷?°ÝÃD½Ð´yz²M·¡
¥ý¥H§ó§ïSheet3!A1:A2¼ÆȬ°¨Ò¡A¦Û¤v¨Ì»Ý¨D§ó§ï- Private Sub Worksheet_Change(ByVal Target As Range)
- Dim Ar()
- If Intersect(Target, [A1:A2]) Is Nothing Then Exit Sub
- Application.ScreenUpdating = False
- r = [A1] '¦C¼Æ
- K = [A2] 'Äæ¼Æ
- For Each C In Sheet1.[B2].Resize(r, 1) '¼W¥[²M³æ¤º®e(«È¤á¯u¥¿»Ý¨D)
- ReDim Preserve Ar(s)
- Ar(s) = C.Value
- s = s + 1
- Next
- For Each C In Sheet2.[E2].Resize(, K) '¼W¥[²M³æ¤º®e(«~½è¯S©Ê)
- ReDim Preserve Ar(s)
- Ar(s) = C.Value
- s = s + 1
- Next
- Me.OLEObjects.Delete
- For i = 1 To r
- For j = 1 To K
- Set a = Cells(i + 1, j + 4)
- With Me.OLEObjects.Add(ClassType:="Forms.ComboBox.1") '´¡¤Jª«¥ó
- .Top = a.Top
- .Left = a.Left
- .Height = a.Height
- .Width = a.Width
- .LinkedCell = a.Address
- .Object.List = Ar
- End With
- Next
- Next
- Application.ScreenUpdating = True
- End Sub
½Æ»s¥N½X |
|