- ©«¤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
|
¦^´_ 7# swatt - Option Explicit
- Private Sub Workbook_SheetChange(ByVal Sh As Object, ByVal Target As Range)
- Dim Rng As Range
- Set Rng = Range("H2:I2")
- If Not Intersect(Target, Rng) Is Nothing Then
- '*******************************************************************
- 'Intersect ¤èªk ¶Ç¦^ Range ª«¥ó¡A¦¹ª«¥ó¥Nªí¨âөΦhÓ½d³ò«Å|ªº¯x§Î½d³ò
- '*******************************************************************
- 'If Target = [h2] Or Target = [i2] Then
- If (Not IsNumeric(Target.Value)) Or IsEmpty(Target.Value) Then
- MsgBox "Must be numeric value!"
- Application.EnableEvents = False
- Target.Value = "" 'this will trigger Target again
- [j2].Value = "" 'clear the cell of yield
- Application.EnableEvents = True
- 'Exit Sub
- End If
- End If
- End Sub
½Æ»s¥N½X |
|