I'm learning VBA and I have two worksheet change events that I need to combine. The first calls a userform when the user selects "other" from a drop-down
Private Sub Worksheet_Change(ByVal Target As Range)
Set Target = Range("C9")
If Target.Value = "Other" Then
SmallUtilityData.Show
End If
End Sub
With the second I am trying to monitor cell E84....everytime the cell's value changes (e.g. is recalculated), I want to compare it to cell C11. If the value in C11 is less than the calculated value in C84, I would like to display a message box.
Private Sub Worksheet_Change(ByVal Target As Range)
Set Target = Range("E84)
If Target.Value > Range("C11").value Then
MsgBox "The array area exceeds the available roof space", vbCritical, "Warning!"
End If
End Sub
Please help, explanations appreciated.
Bookmarks