jim may
Well-known Member
- Joined
- Jul 4, 2004
- Messages
- 7,486
Select is a great method. In VBA it is over-used as experts continually say "you don't need to use the select statement in accomplishing your task". Also, using Select in VBA can cause an error when one tries a statement (with sheet1 active) like Worksheets("Sheet2").Select. This error is obvious when you stop and think about it as even while in the spreadsheet interface say sheet1 -- one cannot select cell A1 on sheet2, without first activating sheet2, then cell A1.
Worksheets("Sheet2").Activate is the same, well nearly…
In VBA - with sheet1 active I sometimes activate sheet2 before issuing a statement against a range on sheet2. There are times when the Worksheets("Sheet2").activate is unnecessary. I just don't know the rules underlying it. So even after years of excel programming these "don't" are not still obvious to me.
If these such no-no's or AVOID DOING THESE THINGS were documented it would be a "good-read" for all excel newcomers/want-a-be's. The Excel boioks I have (around 12 or so) don't cover this sufficiently.
Can some of you begin assisting me in creating this list of clarification
Worksheets("Sheet2").Activate is the same, well nearly…
In VBA - with sheet1 active I sometimes activate sheet2 before issuing a statement against a range on sheet2. There are times when the Worksheets("Sheet2").activate is unnecessary. I just don't know the rules underlying it. So even after years of excel programming these "don't" are not still obvious to me.
If these such no-no's or AVOID DOING THESE THINGS were documented it would be a "good-read" for all excel newcomers/want-a-be's. The Excel boioks I have (around 12 or so) don't cover this sufficiently.
Can some of you begin assisting me in creating this list of clarification