View Single Post
 
Old 05-12-2018, 07:36 AM
NoSparks NoSparks is offline Windows 7 64bit Office 2010 64bit
Excel Hobbyist
 
Join Date: Nov 2013
Location: British Columbia, Canada
Posts: 842
NoSparks is a glorious beacon of lightNoSparks is a glorious beacon of lightNoSparks is a glorious beacon of lightNoSparks is a glorious beacon of lightNoSparks is a glorious beacon of light
Default

Start by Using Option Explicit and declare the variables you use.

When using Worksheet_Change(ByVal Target As Range) use Target.
You think what you've got works because you changed the value in cell O8 and then the Tab key took you to P8 where ActiveCell.Previous happens to be the Target.
That's not the case when you use the left, upper or down arrow.
Replace all those ActiveCell.Previous with Target.

Writing values to the sheet will have this procedure calling itself over and over.
Look into disabling and re-enabling Events to prevent this.

Have a read of this.
Reply With Quote