I've trolled through the threads trying to gain some insight into this one...I'm no coding expert, but I should understand enough not to be missing something that has to be this simple....
I'm going to end up expanding the code and making it much more complicated later, but the problem I'm having here is in getting the MsgBox ("Not 5") to function. It's merely a test MsgBox to indicate that my else staement is triggering. It doesn't appear to be. And for the life of me, I cant figure out why....
I'm going to end up expanding the code and making it much more complicated later, but the problem I'm having here is in getting the MsgBox ("Not 5") to function. It's merely a test MsgBox to indicate that my else staement is triggering. It doesn't appear to be. And for the life of me, I cant figure out why....
VBA Code:
'Option Explicit requires me to define my variables
Option Explicit
'Define the variables globally
Dim LR As Long, LR2 As Long
Dim Target As Range
Private Sub Worksheet_Change(ByVal Target As Range)
LR = ActiveSheet.Cells(Rows.Count, 1).End(xlUp).Row
LR2 = Target.Row
Application.EnableEvents = False
Application.ScreenUpdating = False
If Not Intersect(Target, Range("A5:A" & LR)) Is Nothing Then
If Target.Value <> "" Then
Worksheets("Entry Page").Range("C" & LR2).Formula = _
"...long irrelevant formula that works fine..."
Else
If Target.Row = 5 Then
MsgBox ("5")
Else
MsgBox ("Not 5")
End If
End If
Else
End If
Application.EnableEvents = True
Application.ScreenUpdating = True
End Sub