View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
Hari[_3_] Hari[_3_] is offline
external usenet poster
 
Posts: 157
Default Select First Worksheet

Hi Julie,

"excel always counts the sheets from the left, so the first sheet" is
something new to me.
To understand and verify the same in a workbook with 3 sheets A, B and C (in
that order from left to right) I interchanged positions of A and C and
checked VB editor (in the project window) on how these sheets are referred
as. It said Sheet1(A), Sheet2(B) and Sheet3(C). Why didnt it get updated to
Sheet1(C), Sheet2(B) and Sheet3(A).

Then I saved the sheet and checked again but it showed Sheet1(A), Sheet2(B)
and Sheet3(C). Then I closed and reopened the workbook and now the VB editor
showed it as Sheet1(C), Sheet2(B) and Sheet3(A).

Why the lag in time in updation of the project window?

Surprisingly if I have the following then whenever I interchange the sheets
the present left most only gets highlighted!!

Sub try()
Sheets(2).Activate
End Sub


Regards,
Hari
India

"JulieD" wrote in message
...
Hi

you can refer to it by its index number ... AFAIK excel always counts the
sheets from the left, so the first sheet can be refered to as

Sheets(1).activate

Regards
JulieD

"halem2 " wrote in message
...
Hi:

I have a macro that sorts worksheets regardless of how many sheets. I
need to have the first sheet selected after the sorting is done.

So, if before the sort I have sheets

5 3 8 2 4

After the sort I have

2 3 4 5 8

but the last sheet (8) is selected automatically. I need to have the
first sheet (in this case 2) selected instead. The first sheet will
have different names.

thanks!


---
Message posted from http://www.ExcelForum.com/