In Excel VBA Macro does ActiveWindow.Scroll change ActiveCell at all
5,909
That is correct. These are typically just a side effect of recording a macro. You should be able to remove them without affecting your macro.
Related videos on Youtube
![Ravindra Bawane](https://lh3.googleusercontent.com/-3TpEVzIzPJw/AAAAAAAAAAI/AAAAAAAAS2c/q5fl9V7667I/photo.jpg?sz=256)
Author by
Ravindra Bawane
Updated on September 18, 2022Comments
-
Ravindra Bawane almost 2 years
I'm cleaning up and extending some excel VBA macros (written and currently running in Excel 2003), and I have a question about how far I can go in cleaning up without modifying the output.
There are sevral ActiveWindow.Scroll or similar entries in the macro. So far as I understand these only move the spreadsheet within the viewable window. Is this correct?
Just to expand and confirm: Removing Scroll entries should in no way affect the selected cell, row, or column the macro will be working upon.
-
Ravindra Bawane about 13 yearsThank you for the confirmation. In my experience I've not found a case where they've done anything meaningful, but it's good to have additional confirmation they indeed do not affect data processing portions of the macro.