Forum Discussion
Macros tab selection
1) Delete all lines of the form
ActiveWindow.ScrollWorkbookTabs ...
and of the form
ActiveWindow.SmallScroll ...
They are side effects of recording a macro, but they aren't necessary and only slow down execution.
2) Delete all lines of the form
Sheets("...").Select
The code will then run on whichever sheet is active.
- Kjstern1956Mar 01, 2023Copper Contributor
still working on the Macro. I have several raw data sheets where I am trying to eliminate all non relevant rows. not all raw data sheets have the same number of rows.
So when recording my Macro, i key:
Home
Shift-End Down-Shift-End Right and that captures all the data for the sheet i am in. however when I stop recording and review the code, it show a specific cell range IE: $A$1:$W$500.
How do I correct the code so its not showing a specific cell reference.
- HansVogelaarMar 01, 2023MVP
- Kjstern1956Mar 01, 2023Copper ContributorI get a compile Error & Syntax Error