- ©«¤l
- 967
- ¥DÃD
- 0
- ºëµØ
- 0
- ¿n¤À
- 1001
- ÂI¦W
- 0
- §@·~¨t²Î
- WIN XP
- ³nÅ骩¥»
- OFFICE 2003
- ¾\ŪÅv
- 50
- ©Ê§O
- ¨k
- ¨Ó¦Û
- ¥x¥_
- µù¥U®É¶¡
- 2010-11-29
- ³Ì«áµn¿ý
- 2022-5-17
|
¥»©«³Ì«á¥Ñ register313 ©ó 2012-2-15 17:24 ½s¿è
B1.rar (8.3 KB)
¦^´_ 7# av8d
קïHsieh¶Wª©¤§µ{¦¡
2¿ªºµ{¦¡½X,°Ñ¦Ò
¤u§@ªí¼Ò²Õ- Private Sub Worksheet_SelectionChange(ByVal Target As Range)
- Application.EnableEvents = False
- If Target.Count = 1 Then
- If Target.Column = 1 Then
- ReDim Preserve Ar(s)
- Ar(s) = Target.Value
- s = s + 1
- [B65536].End(xlUp).Offset(1) = Target
- Target.Delete xlShiftUp
- ElseIf Target.Column = 3 Then
- ReDim Preserve Ar1(t)
- Ar1(t) = Target.Value
- t = t + 1
- [D65536].End(xlUp).Offset(1) = Target
- Target.Delete xlShiftUp
- End If
- End If
- Application.EnableEvents = True
- End Sub
½Æ»s¥N½X ¤@¯ë¼Ò²Õ- Public Ar(), Ar1(), s&, t&
- Sub «ö¶s1_Click()
- Application.EnableEvents = False
- If (s <> 0) Then
- [A1].Resize(s, 1).Insert xlShiftDown
- [A1].Resize(s, 1).Value = Application.Transpose(Ar)
- Range([B2], [B2].End(xlDown)).ClearContents
- s = 0: Erase Ar: Set Rng = Nothing
- End If
- If (t <> 0) Then
- [C1].Resize(t, 1).Insert xlShiftDown
- [C1].Resize(t, 1).Value = Application.Transpose(Ar1)
- Range([D2], [D2].End(xlDown)).ClearContents
- t = 0: Erase Ar1: Set Rng = Nothing
- End If
- Application.EnableEvents = True
- End Sub
½Æ»s¥N½X |
|