I've run into a Stack Overflow issue with the below code. The error happened on Set rngToCheck = Range("GenLoanAmount") and I'm not really sure why since there doesn't seem to be enough happening that would cause that issue. This code does work, so if deemed necessary by the community I will post it on Code Review. Thank you for taking a look.
Private Sub Worksheet_Change(ByVal Target As Range)
Dim rngToCheck As Range
Set rngToCheck = Range("GenLoanAmount")
If Not Intersect(Target, Me.Range("FloodIns")) Is Nothing Then
If Intersect(Target, Me.Range("FloodIns")) = "Y" Or Intersect(Target, Me.Range("FloodIns")) = "y" Then FloodEmail.Show
End If
If Not Intersect(Target, Me.Range("FloodInsAct")) Is Nothing Then
If Intersect(Target, Me.Range("FloodInsAct")) = "Y" Or Intersect(Target, Me.Range("FloodInsAct")) = "y" Then FloodActEmail.Show
End If
If Not Intersect(Target, rngToCheck) Is Nothing Then
If Intersect(Target, rngToCheck) Then
rngToCheck.NumberFormat = "$#,##0.00"
End If
End If
If Not Intersect(Target, Me.Range("genCloseDate")) Is Nothing Then
If Intersect(Target, Me.Range("genCloseDate")) <> vbNullString Then FundDateCalc
End If
End Sub
FundDateCalc, trigger a change in the worksheet? To be safe, events should be disabled and then enabled at the end.