- ©«¤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
|
¦^´_ 7# bridetobe
n§ó§ï¤w¸g¿é¤J¤º®e´N¥²¶·«·s¼g¤J- Private Sub Worksheet_Change(ByVal Target As Range)
- Dim A As Range
- If Target.Column <> 2 Then Exit Sub
- With Sheet3
- ThisWorkbook.Names.Add "²M³æ", "=OFFSET(" & .Name & "!$A$1,,,COUNTA(" & .Name & "!$A:$A),)"
- With Range("B:B").Validation
- .Delete
- .Add xlValidateList, , , "=²M³æ"
- End With
- Select Case Target.Value
- Case "·s¼W"
- newitem = InputBox("¿é¤J·s¼W¶µ¥Ø")
- If Application.CountIf([²M³æ], newitem) = 0 Then
- Set A = .Columns("A:A").Find("·s¼W", lookat:=xlWhole)
- A.Insert xlShiftDown
- A.Offset(-1) = newitem
- Target = newitem
- Else
- MsgBox "¶µ¥Ø¤w¦s¦b²M³æ¤º"
- End If
- Case "§R°£"
- delitem = InputBox("¿é¤J§R°£¶µ¥Ø")
- Set A = .Columns("A:A").Find(delitem, lookat:=xlWhole)
- If A Is Nothing Then
- MsgBox delitem & "¤£¦s¦b²M³æ¤º"
- Else
- A.Delete xlShiftUp
- End If
- Case "קï"
- chitem = InputBox("¿é¤Jקﶵ¥Ø")
- Set A = .Columns("A:A").Find(chitem, lookat:=xlWhole)
- If A Is Nothing Then
- MsgBox chitem & "¤£¦s¦b²M³æ¤º"
- Else
- A.Value = InputBox("¿é¤J§ó¥¿¶µ¥Ø", , chitem)
- Target = A
- Range("B:B").Replace chitem, A 'BÄæ©Ò¦³¤w¸g¿é¤Jªº¸ê®Æ¤@°_´À´«
- End If
- End Select
- End With
- With Range("B:B").Validation
- .Modify xlValidateList, , , "=²M³æ"
- End With
- End Sub
½Æ»s¥N½X |
|