I have a very long set of recorded macros that use select statements a lot. Consequently, the performance is very slow. But in trying to get rid of the select statements, there is something I'm doing wrong. I'm not getting the syntax correct. The examples below show three common occurrences. If someone can correct these examples then perhaps I can take it from there.
Thanks in advance,
Andrew
Code:
Range("A6").Select
Selection.End(xlDown).Select
ActiveCell.Offset(1).Select
ActiveCell.FormulaR1C1 = "x"
Code:
ActiveSheet.Shapes.Range(Array("Rounded Rectangle 50")).Select
Selection.ShapeRange.ZOrder msoBringToFront
Range("A5").Select
Note that when I'm selecting the range, it is dynamic. I am not able to hard code a range as A10:A1000.
Code:
Range("A6").Select
Range(Selection, Selection.End(xlDown)).Select
On Error GoTo NoX
Selection.Find(What:="x", After:=ActiveCell, LookIn:=xlValues, LookAt:= _
xlWhole, SearchOrder:=xlByRows, SearchDirection:=xlNext, MatchCase:=False _
, SearchFormat:=False).Select
ActiveCell.ClearContents