Hello all
I'm trying to generate MsgBox popups when a value >0 is entered by the user into Sheet1!A1 , A2, etc..
Snippet is below. The MsgBox works perfectly when a value is entered in A1. However the MsgBox does not popup if a value is entered in A2.
I've used two separate macros as I need to replicate the msgBox(s) across a number of cells in my sheet.
I'm open to either separate macros for each alert or some smart way to work it into a single loop..
(the values will be entered manually by the users, not by formula or link etc..)
Thanks in advance for any insights
Conor
' the macro for cell A1
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Cells.Count > 1 Then Exit Sub
If Not Intersect(Target, Range("A1")) Is Nothing Then
If Target.Value > 0 Then MsgBox "Hello World! My value is great than zero!"
End If
End Sub
' a separate macro for cell A2
Private Sub Worksheet_Change2(ByVal Target As Range)
If Target.Cells.Count > 1 Then Exit Sub
If Not Intersect(Target, Range("A2")) Is Nothing Then
If Target.Value > 0 Then MsgBox "Hey Guess What World, my value is greater than zero as well"
End If
End Sub
Bookmarks