litestream
Active Member
- Joined
- Jul 24, 2006
- Messages
- 323
When I use the following code, it affects other cells also. How can I stop this?
Code:
Private Sub Worksheet_Change(ByVal Target As Range)
Dim rng As Range
Const limit = 100
Set rng = Range("C10")
If Target.Count > 1 Then Exit Sub
With Application
.EnableEvents = False
MsgBox "100 is the Maximum bundle size"
If Target > limit Then .Undo
.EnableEvents = True
End With
End Sub