Selecting vs Activating - VERY newbie

Sam05

New Member
Joined
Feb 7, 2009
Messages
23
Hi all,

could someone please explain the differences between Selecting a sheet/wb and Activating a sheet/wb? when do you use each one, etc.?

Thanks
 

Excel Facts

Remove leading & trailing spaces
Save as CSV to remove all leading and trailing spaces. It is faster than using TRIM().
Activate can only activate only one object.

Select can select multiple objects.

Code:
With Range("a1:b10")
    .Select
    .Cells(2).Activate
    MsgBox Selection.Address & " is selected" & vbLf & _
               ActiveCell.Address & " is active"
End With
 
Upvote 0
Hi jindon,

thanks. Same applies to the following?

Code:
Sheets("Sheet1").Select

and

Code:
Sheets("Sheet1").Activate

or is this syntax used for different purposes?
 
Upvote 0
Select for Sheet object has an argument (Replace)

Sheets("sheet1").Select replace:=False

will select Sheet1 & the sheet(s) already selected...

Sheets("sheet1").Activate will always Activate "Sheet1"

That's the only difference AFIK, so my answer to your question is no difference.
 
Upvote 0

Forum statistics

Threads
1,214,958
Messages
6,122,475
Members
449,087
Latest member
RExcelSearch

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