how can i remove the selection from this code, and not get an error? i want to make the changes to the cells but not select those cells. the problem is this selction is running after some other code and it is making the selected cells always return to those cells rather than leaving the active cell the next cell the user selects by hitting enter or a direction likke left or right. so my users have to scroll up all the time. very annoying.
Code:
Range("D9:E9").Select
With Selection
.HorizontalAlignment = xlCenter
.VerticalAlignment = xlCenter
.WrapText = False
.Orientation = 0
.AddIndent = False
.IndentLevel = 0
.ShrinkToFit = False
.ReadingOrder = xlContext
.MergeCells = False
.Replace What:=Chr(10), Replacement:=""
End With