Logo 
Search:

MS Office Forum

Ask Question   UnAnswered
Home » Forum » MS Office       RSS Feeds

Select OR Activate a Sheet (?)

  Asked By: Dora    Date: Oct 29    Category: MS Office    Views: 1158
  

What is or are the main differences when doing:

Worksheets("Sheet1").Select
Worksheets("Sheet1").Activate

Share: 

 

9 Answers Found

 
Answer #1    Answered By: Josephine Gomez     Answered On: Oct 29

I don't know the answer. I would log all the events
that occur when you do both (using either MsgBox or Debug>print) and see if
they differ.

 
Answer #2    Answered By: Aadi Martin     Answered On: Oct 29

Excel's VBA help says....

"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."

HA...but that still leaves a little pretzel logic to be deciphered, I guess?

 
Answer #3    Answered By: Jawwad Akram     Answered On: Oct 29

As I know...the difference between two could be understand by below example.

If you need to perform an operation on a specific sheet, you do
Worksheets("Sheet1").Select
Operation will take place perfectly does not matter which sheet  you had
active.

But in another case you perform the operation after activating the sheet and
you use.
Worksheets("Sheet1").Activate

 
Answer #4    Answered By: Shirley Allen     Answered On: Oct 29

"Worksheets("Sheet1").Select"will simply activate  to that sheet, then what is
the use of "Worksheets("Sheet1").activate"
I think we need to work around more what do u feel Dian ?
Somewhere, I found that it's useful when you will make your excel sheet  as
ADD-Ins....As there is not sheet to activated B'coz it's hidden..
Once I revel this topic more I'l post..

 
Answer #5    Answered By: Myrna Brown     Answered On: Oct 29

Try the following:

Sub Test()
'
Range("A1:C5").Select
Range("B2").Activate
End Sub

Don't know why you would like to do something like this, however it
gave me a better understanding of the difference between Select and
Activate.

 
Answer #6    Answered By: Reginald Thomas     Answered On: Oct 29

I really not able to understand, Why every one is replying on range
object...the question raised on Worksheet's Select/Activate methods.

 
Answer #7    Answered By: Seth Anderson     Answered On: Oct 29

Here the REAL difference between these two statements
Sheets("Sheet1").Select and Sheets("Sheet1).Activate

Lets say, you would have "Sheet2" as a hidden sheet,
and have "Sheet1" as a non-hidden(visible) sheet.

The REAL difference is this:
For "Sheet2", you can do Sheets("Sheet2").Activate
but cannot do Sheets("Sheet2").Select
because "Sheet2" is hidden.

For "Sheet1", you can do Sheets("Sheet1").Activate
and also do Sheets("Sheet1").Select
because "Sheet1" is non-hidden(visible) sheet.

 
Answer #8    Answered By: Jeanne Lawson     Answered On: Oct 29

It's pretty similar to my last post about ADD-Ins.

 
Answer #9    Answered By: Reamonn Fischer     Answered On: Oct 29

I believe you will find that the question was about selecting/activating sheets,
not ranges.

I've been having a play with this and have yet to find a difference - at the
sheet level.

 
Didn't find what you were looking for? Find more on Select OR Activate a Sheet (?) Or get search suggestion and latest updates.




Tagged: