ªð¦^¦Cªí ¤W¤@¥DÃD µo©«

[µo°Ý] ·íBÄæ¸¹½X»P¹w³]³W«h¤£¦P®É¡A¦p¦ó¼u¥Xµøµ¡´£¿ô¡H

¥»©«³Ì«á¥Ñ ­ã´£³¡ªL ©ó 2015-11-29 16:58 ½s¿è

Private Sub Worksheet_Change(ByVal Target As Range)
Dim E As Range, M, N
If [B1] = 111 Then Exit Sub¡@'§@°Ê¡eÃö³¬¡f¡@
For Each E In Target
¡@¡@If Not Application.Intersect(E, [B3:B79]) Is Nothing Then
¡@¡@¡@M = Application.Match(E(1, 2), [AA3:AA500], 0)
¡@¡@¡@If IsError(M) Then N = 3 Else N = 1
¡@¡@¡@If E(1, 2) = "" Then N = ""
¡@¡@¡@If E <> N Then
¡@¡@¡@¡@MsgBox "¿é¤J¤º®e¿ù»~¡I±N¦Û°Ê­×¥¿¡ã¡ã¡@"
¡@¡@¡@¡@Application.EnableEvents = False
¡@¡@¡@¡@E = N
¡@¡@¡@¡@Application.EnableEvents = True
¡@¡@¡@End If
¡@¡@End If
Next
End Sub

TOP

¥»©«³Ì«á¥Ñ ­ã´£³¡ªL ©ó 2015-11-29 17:41 ½s¿è

¡@¡@¡@If E <> N Then
¡@¡@¡@¡@MsgBox "¿é¤J¤º®e¿ù»~¡I±N¦Û°Ê¡eÁÙ­ì¡f¡ã¡ã¡@"
¡@¡@¡@¡@Application.EnableEvents = False
¡@¡@¡@¡@Application.Undo '°õ¦æÁÙ­ì«ü¥O
¡@¡@¡@¡@Application.EnableEvents = True
¡@¡@¡@End If

TOP

¥»©«³Ì«á¥Ñ ­ã´£³¡ªL ©ó 2015-11-29 17:03 ½s¿è

¦^´_ 6# RCRG


If [B1] = 111 Then Exit Sub¡@
¢Ð¢°¿é¤J111¡A¤£°õ¦æ

¢ÑÄæªÅ®æ¡A¤£²z·|¡G
'If E(1, 2) = "" Then N = ""¡@§R¥h
If E <> N And E(1, 2) <> "" Then¡@¥[¤J§PÂ_

TOP

        ÀR«ä¦Û¦b : ¤f»¡¤@¥y¦n¸Ü¡A¦p¤f¥X½¬ªá¡F¤f»¡¤@¥yÃa¸Ü¦p¤f¦R¬r³D¡C
ªð¦^¦Cªí ¤W¤@¥DÃD