SHEETS.SELECT or SHEETS.ACTIVATE
What is the exact difference between Sheet.Activate and Sheet.Select. We have always managed to get the required thing done but still many of us are not sure of the exact difference. So this is how it goes.
Consider the following set of statements:
1. Sheets(Array("Sheet1", "Sheet2", "Sheet3")).Select
2. Sheets(Array("Sheet1", "Sheet2", "Sheet3")).Select
What would be the difference in the result of the two statements?
The first statement would activate Sheet2 (all other sheets are still selected). However the second statement, i.e. if you use select, Sheet2 is the only sheet that is selected.
With Activate, if you presently have more than one sheet selected, the ActiveSheet will change, but all selected sheets will remain selected.Select can select multiple objects. Activate can activate only one object. To select a cell or a range of cells, use the Select method. To make a single cell the active cell, use the Activate method.
PEOPLE WHO READ THIS ALSO READ : Excel, VBA, VBA-SHEETS ACTIVATE, VBA-SHEETS SELECT
This entry was posted on Oct 5, 2009 at 3:02 AM and is filed under Excel, VBA, VBA-SHEETS ACTIVATE, VBA-SHEETS SELECT. You can follow any responses to this entry through the RSS 2.0. You can leave a response.
If you liked this post, make sure you subscribe to the RSS feed!