The entire code: Private Sub Worksheet_Change(ByVal Target As Range) Or from the drop-down list at the top left, select "Change" and in the space between Private Sub and End Sub, paste If Not Intersect(Target, Me.Range("H5")) Is Nothing ThenĤ) On the line after "Then" turn off events so that when you call your macro, it does not trigger events and try to run this Worksheet_Change again in a never ending cycle that crashes Excel and/or otherwise messes everything up: Application.EnableEvents = FalseĦ) Turn events back on so the next change (and any/all other events) trigger: Application.EnableEvents = True If Not Intersect(Target, Me.Range("H5")) Is Nothing Then Do not place your Macro yet, however (I removed the word "Macro" after "Then"): Private Sub Worksheet_Change(ByVal Target As Range) Range reference to the cell for which you are watching for a change (B3, in my case).
Copy/Paste Mike Rosenblum's code from above and change the.
Since there was so much scattered info I decided to share what I have found to work all in one place, step by step as follows:ġ) Open VBA Editor, under VBA Project (YourWorkBookName.xlsm) open Microsoft Excel Object and select the Sheet to which the change event will pertain.Ģ) The default code view is "General." From the drop-down list at the top middle, select "Worksheet."ģ) Private Sub Worksheet_SelectionChange is already there as it should be, leave it alone. I spent a lot of time researching this and learning how it all works, after really messing up the event triggers.