Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
ActiveWindow.ActivateNext ----Is there a ActiveSheet.ActivateNext
-- Esau |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
ActiveWindow.ActivateNext ----Is there a ActiveSheet.ActivateNext
You could always use something like this (it stops at the last sheet)... Worksheets(ActiveSheet.Index-(ActiveSheet.Index<Worksheets.Count)).Activate Rick |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Not really. By using the worksheet index number you can activate the next
sheet tab to the right. Worksheets(ActiveSheet.Index + 1).Activate Mike F "Esau" wrote in message ... ActiveWindow.ActivateNext ----Is there a ActiveSheet.ActivateNext -- Esau |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Rick's reply is more accurate whereas mine would error out on the last
sheet. Mike F "Mike Fogleman" wrote in message ... Not really. By using the worksheet index number you can activate the next sheet tab to the right. Worksheets(ActiveSheet.Index + 1).Activate Mike F "Esau" wrote in message ... ActiveWindow.ActivateNext ----Is there a ActiveSheet.ActivateNext -- Esau |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
You can use
ActiveSheet.Next.Select ActiveSheet.Previous.Select But test where you are because it blow if you you are in the last/first sheet -- Regards Ron de Bruin http://www.rondebruin.nl/tips.htm "Esau" wrote in message ... ActiveWindow.ActivateNext ----Is there a ActiveSheet.ActivateNext -- Esau |
#6
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
ActiveWindow.ActivateNext ----Is there a ActiveSheet.ActivateNext
You could always use something like this (it stops at the last sheet)... Worksheets(ActiveSheet.Index-(ActiveSheet.Index<Worksheets.Count)).Activate As I said, the above code stops the indexing at the last sheet. If, after you reach the last sheet, you wanted to wrap back around to the first sheet, give this a try... Worksheets(ActiveSheet.Index + 1 + Worksheets.Count * _ (ActiveSheet.Index + 1 Worksheets.Count)).Activate Rick |
#7
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
As I said, the above code stops the indexing at the last sheet. If, after
you reach the last sheet, you wanted to wrap back around to the first sheet, give this a try... Worksheets(ActiveSheet.Index + 1 + Worksheets.Count * _ (ActiveSheet.Index + 1 Worksheets.Count)).Activate And if you need code to move to the Previous sheet where, if the ActiveSheet is the first one, it wraps back around to the last sheet, this code will do that... Worksheets(ActiveSheet.Index - 1 - Worksheets.Count * _ (ActiveSheet.Index = 1)).Activate Rick |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|