- ©«¤l
- 4901
- ¥DÃD
- 44
- ºëµØ
- 24
- ¿n¤À
- 4916
- ÂI¦W
- 196
- §@·~¨t²Î
- Windows 7
- ³nÅ骩¥»
- Office 20xx
- ¾\ŪÅv
- 150
- ©Ê§O
- ¨k
- ¨Ó¦Û
- ¥x¥_
- µù¥U®É¶¡
- 2010-4-30
- ³Ì«áµn¿ý
- 2025-8-11
               
|
¥»©«³Ì«á¥Ñ Hsieh ©ó 2014-2-10 14:56 ½s¿è
¦^´_ 4# j88141
½ÒªíÂú§Î¤u§@ªí¼Ò²Õ- Private Sub Worksheet_Change(ByVal Target As Range)
- If Target.Count > 1 Then Exit Sub
- Application.EnableEvents = False
- k = Target.Column
- r = Target.Row
- w = Cells(2, k)
- t = IIf(r <= 22, "¦¤W", IIf(r > 22 And r <= 38, "¤U¤È", "±ß¤W"))
- If Target<>"" And Check(w & t, Target) > 0 Then MsgBox "¸Ó±Ð®v¦¹®É¬q¤£±Æ½Ò": Target.ClearContents
- Application.EnableEvents = True
- End Sub
- Function Check(mystr$, MyVal)
- Dim Ob As Shape, A As Range, Dic As Object
- Set Dic = CreateObject("Scripting.Dictionary")
- With ¤u§@ªí1
- For Each Ob In .Shapes
- If Ob.OLEFormat.Object.Value = 1 Then
- Set A = Ob.TopLeftCell
- w = .Cells(1, A.Column).MergeArea(1)
- t = .Cells(3, A.Column)
- Dic(w & t) = IIf(Dic(w & t) = "", .Cells(A.Row, 1), Dic(w & t) & "," & .Cells(A.Row, 1))
- End If
- Next
- Check = InStr(Dic(mystr), MyVal)
- End With
- End Function
½Æ»s¥N½X
|
|