View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
RJQMAN[_2_] RJQMAN[_2_] is offline
external usenet poster
 
Posts: 54
Default What is the difference between 'Select' a sheet and 'Activate' a sheet

I have a complex program that has been running fine on Excel 2003,
2007, and 2010. Today when running the program on Excel 2003 I got an
error messages and the program hung up on this statement;

ThisWorkbook.Sheets("Recap").Select

I think the error said something like 'Method Not Supported,' but I do
not remember exactly what it said.

I tried various things and could not figure out why it crashed. Then
II replaced the statement with

ThisWorkbook.Sheets("Recap").Activate

and it ran without any problems.

I have run the program about a dozen times since the change, and it is
doing fine. I just don't understand why it crashed in the first
place??

In my program I had been using the two terms (select and activate)
interchangeably with respect to sheets. I guess that was a mistake,
and they really are not interchangeable. So I went through my program
and changed all the 'Selects' for sheets to 'Activate' just in case.
But I don't understand why this change worked?

The program was just starting up when it crashed, by the way, if that
helps.

Thanks in advance to anyone who could help me understand this. I
really appreciate it.