Geekamo
asked on
VBA - Clear contens of cell, if other cells change
Hello Experts,
I am using some VBA code, but it doesn't appear to be working/running? (I have no idea how to verify its even executing)
Here is the code...
pmDimensions consists of 3 cells. Basically, if any value changes, then I want to clear the contents of pmSeal.
Any ideas what is wrong with the code above?
I am using some VBA code, but it doesn't appear to be working/running? (I have no idea how to verify its even executing)
Here is the code...
Private Sub Worksheet_Change(ByVal Target As Range)
With Target
If .Address = "pmDimensions" Then
Range("pmSeal").Value = ""
End If
End With
End Sub
pmDimensions consists of 3 cells. Basically, if any value changes, then I want to clear the contents of pmSeal.
Any ideas what is wrong with the code above?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
This worked great - thanks Kevin!
Private Sub Worksheet_Change(ByVal Target As Range)
Application.EnableEvents = False
With Target
If .Address = "pmDimensions" Then
Range("pmSeal").Value = ""
End If
End With
Application.EnableEvents = True
End Sub
Kevin