Select and Activate

Andrew XJ

Board Regular
Joined
Feb 21, 2002
Messages
77
Could you tell me what's the difference between Select and Activate by Example? The object maybe Worksheet, Windows, or Workbook.
 

Excel Facts

What is the fastest way to copy a formula?
If A2:A50000 contain data. Enter a formula in B2. Select B2. Double-click the Fill Handle and Excel will shoot the formula down to B50000.
I took a look at Michael Kofler's book "Definitive Guide to Excel VBA" regarding this.

Not a whole lot of difference. Both methods are used without parameters and do not return a direct result. They change properties such as ActiveCell and Selection.

Activate is generally intended for individual cells, and Select for ranges of cells (these methods also are used with other objects, such as worksheets, charts, etc, but my response here is to speak in general terms).

Whether you Select range A1:A5, or Activate A1:A5, A1 will be the active cell, and A1:A5 the selected range.

The only other thing (which really speaks to their same-ness instead of difference) is that both methods can only select cells or ranges in the active worksheet. If you are on Sheet1 and try something like Range(Sheet2!A1).Select, you'd get an error.

Bottom line, not a heckuva lotta diff, especially where cells and ranges are concerned.
 
Upvote 0
Thx.Tom, so to summarize, the key difference is in Range Object.
I don't know whether the effects will be different using Sheets("Sheet1").Activate or Sheets("Sheet1").Select. Maybe in later work, the doubts will be cleared by errors.
 
Upvote 0

Forum statistics

Threads
1,213,501
Messages
6,114,010
Members
448,543
Latest member
MartinLarkin

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top