|
すみません。
修正してください。
>If Target.Cells(1).Column = 1 And Target.Row <= 5 Or _
> Target.Cells(1).Column = 4 And Target.Row >= 3 And Target.Row <= 8 Or _
> Target.Cells(1).Column = 6 And Target.Row >= 5 And Target.Row <= 6 Then
> If Target.Cells(1).Value >= "1" And Target.Cells(1).Value <= "4" _
> Or Target.Cells(1) = "" Then
> 'MsgBox "OK"
> Else
> MsgBox "NG"
> Application.EnableEvents = False
> Application.Undo
> Application.EnableEvents = True
> End If
>End If
↓
If (Target.Cells(1).Column = 1 And Target.Row <= 5) Or _
(Target.Cells(1).Column = 4 And Target.Row >= 3 And Target.Row <= 8) Or _
(Target.Cells(1).Column = 6 And Target.Row >= 5 And Target.Row <= 6) Then
If Val(Target.Cells(1).Value) >= 1 And Val(Target.Cells(1).Value) <= 4 Or _
Target.Cells(1).Value = "" Then
'MsgBox "OK"
Else
MsgBox "NG"
Application.EnableEvents = False
Application.Undo
Application.EnableEvents = True
End If
End If
|
|