·s¼W¤@Ó¬Û¦PªºIF§P§O¦¡¡A°õ¦æµ²ªG©Mקï«e¤@¼Ë¡H
- ©«¤l
- 710
- ¥DÃD
- 280
- ºëµØ
- 0
- ¿n¤À
- 1016
- ÂI¦W
- 0
- §@·~¨t²Î
- Windows 10
- ³nÅ骩¥»
- Office 2019
- ¾\ŪÅv
- 50
- ©Ê§O
- ¨k
- µù¥U®É¶¡
- 2011-6-30
- ³Ì«áµn¿ý
- 2025-1-19
|
·s¼W¤@Ó¬Û¦PªºIF§P§O¦¡¡A°õ¦æµ²ªG©Mקï«e¤@¼Ë¡H
¥»©«³Ì«á¥Ñ av8d ©ó 2013-6-17 11:01 ½s¿è
קï«e- Private Sub Worksheet_Change(ByVal Target As Range)
- Dim Rng As Range, I As Integer
- With Target
- '.Select '¦h¤@¦¸½T»{
- If .Column = 4 Or .Column = 12 Then
- If Cells(.Row, 4) <> "" And Cells(.Row, 12) <> "" Then
- For I = 1 To Cells(Rows.Count, .Column).End(xlUp).Row
- If Cells(I, 4) = Cells(.Row, 4) And Cells(I, 12) = Cells(.Row, 12) And I <> .Row Then
- If Rng Is Nothing Then
- Set Rng = Union(Cells(I, 4), Cells(I, 12))
- Else
- Set Rng = Union(Rng, Cells(I, 4), Cells(I, 12))
- End If
- End If
- Next
- If Not Rng Is Nothing Then
- Set Rng = Union(Rng, Cells(.Row, 4), Cells(.Row, 12))
- Rng.Select
- 'MsgBox Cells(.Row, 4) & vbNewLine & Cells(.Row, 12) & vbNewLine & "¥X²{«½Æ "
- UserForm2.Show
- End If
- End If
- End If
- End With
-
- If Target.Cells.Count > 1 Then Exit Sub
- If Union(Target, [K:K]).Address <> [K:K].Address Then Exit Sub
- If Target = "¬õ¦â" Then
- UserForm1.Show
- End If
- End Sub
½Æ»s¥N½X קï«á- Private Sub Worksheet_Change(ByVal Target As Range)
- Dim Rng As Range, I As Integer
- With Target
- '.Select '¦h¤@¦¸½T»{
- If .Column = 4 Or .Column = 12 Then
- If Cells(.Row, 4) <> "" And Cells(.Row, 12) <> "" Then
- For I = 1 To Cells(Rows.Count, .Column).End(xlUp).Row
- If Cells(I, 4) = Cells(.Row, 4) And Cells(I, 12) = Cells(.Row, 12) And I <> .Row Then
- If Rng Is Nothing Then
- Set Rng = Union(Cells(I, 4), Cells(I, 12))
- Else
- Set Rng = Union(Rng, Cells(I, 4), Cells(I, 12))
- End If
- End If
- Next
- If Not Rng Is Nothing Then
- Set Rng = Union(Rng, Cells(.Row, 4), Cells(.Row, 12))
- Rng.Select
- 'MsgBox Cells(.Row, 4) & vbNewLine & Cells(.Row, 12) & vbNewLine & "¥X²{«½Æ "
- UserForm2.Show
- End If
- End If
- End If
- End With
-
- If Target.Cells.Count > 1 Then Exit Sub
- If Union(Target, [K:K]).Address <> [K:K].Address Then Exit Sub
- If Target = "¬õ¦â" Then
- UserForm1.Show
- End If
-
- If Target.Cells.Count > 1 Then Exit Sub
- If Union(Target, [K:K]).Address <> [K:K].Address Then Exit Sub
- If Target = "ÂŦâ" Then
- UserForm3.Show
- End If
- End Sub
½Æ»s¥N½X ´ú¸Õµ²ªG¡GUserForm1©MUserForm2¦³¥X¨Ó¡A·s¼WªºUserForm3¨S¥X¨Ó¡C |
|
|
|
|
|
|
- ©«¤l
- 5923
- ¥DÃD
- 13
- ºëµØ
- 1
- ¿n¤À
- 5986
- ÂI¦W
- 0
- §@·~¨t²Î
- win10
- ³nÅ骩¥»
- Office 2010
- ¾\ŪÅv
- 150
- ©Ê§O
- ¨k
- ¨Ó¦Û
- ¥xÆW°ò¶©
- µù¥U®É¶¡
- 2010-5-1
- ³Ì«áµn¿ý
- 2022-1-23
        
|
¦^´_ 1# av8d - Option Explicit
- Private Sub Worksheet_Change(ByVal Target As Range)
- Dim Rng As Range, I As Integer
- With Target
- '.Select '¦h¤@¦¸½T»{
- If .Column = 4 Or .Column = 12 Then
- If Cells(.Row, 4) <> "" And Cells(.Row, 12) <> "" Then
- For I = 1 To Cells(Rows.Count, .Column).End(xlUp).Row
- If Cells(I, 4) = Cells(.Row, 4) And Cells(I, 12) = Cells(.Row, 12) And I <> .Row Then
- If Rng Is Nothing Then
- Set Rng = Union(Cells(I, 4), Cells(I, 12))
- Else
- Set Rng = Union(Rng, Cells(I, 4), Cells(I, 12))
- End If
- End If
- Next
- If Not Rng Is Nothing Then
- Set Rng = Union(Rng, Cells(.Row, 4), Cells(.Row, 12))
- Rng.Select
- 'MsgBox Cells(.Row, 4) & vbNewLine & Cells(.Row, 12) & vbNewLine & "¥X²{«½Æ "
- ' UserForm2.Show
- End If
- End If
- End If
- If .Cells.Count > 1 Then Exit Sub
- If Union(.Cells, [K:K]).Address <> [K:K].Address Then Exit Sub
- If .Cells = "¬õ¦â" Then
- UserForm1.Show
- ElseIf .Cells = "ÂŦâ" Then
- UserForm3.Show
- End If
- End With
- End Sub
½Æ»s¥N½X |
|
|
|
|
|
|