Error: Compile Error - Expected Function or variable
Macro:
(The word "Selection" is highlighed in the VBA editor, hence why it is highlighted here.)
This macro worked perfectly until about an hour ago, as part of a larger macro. I tried rewriting it by hand, then separating it into its own individual macro, and finally I used the Record Macro tool, all with the same result.
The exact same Macro in an entirely new Excel file works perfectly.
Any idea's what I did to cause this and how to avoid this in the future?
Macro:
Sub WhiteFlag()
Range("A5").SelectEnd Sub
Selection.EntireRow.Insert
(The word "Selection" is highlighed in the VBA editor, hence why it is highlighted here.)
This macro worked perfectly until about an hour ago, as part of a larger macro. I tried rewriting it by hand, then separating it into its own individual macro, and finally I used the Record Macro tool, all with the same result.
The exact same Macro in an entirely new Excel file works perfectly.
Any idea's what I did to cause this and how to avoid this in the future?