PC Review


Reply
 
 
=?Utf-8?B?RXNhdQ==?=
Guest
Posts: n/a
 
      21st Nov 2007
ActiveWindow.ActivateNext ----Is there a ActiveSheet.ActivateNext


--
Esau
 
Reply With Quote
 
 
 
 
Rick Rothstein \(MVP - VB\)
Guest
Posts: n/a
 
      21st Nov 2007
> 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
 
Reply With Quote
 
Mike Fogleman
Guest
Posts: n/a
 
      21st Nov 2007
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" <(E-Mail Removed)> wrote in message
news747036B-F0BC-4D4E-8CC3-(E-Mail Removed)...
> ActiveWindow.ActivateNext ----Is there a ActiveSheet.ActivateNext
>
>
> --
> Esau



 
Reply With Quote
 
Mike Fogleman
Guest
Posts: n/a
 
      21st Nov 2007
Rick's reply is more accurate whereas mine would error out on the last
sheet.

Mike F
"Mike Fogleman" <(E-Mail Removed)> wrote in message
news:Uc-(E-Mail Removed)...
> 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" <(E-Mail Removed)> wrote in message
> news747036B-F0BC-4D4E-8CC3-(E-Mail Removed)...
>> ActiveWindow.ActivateNext ----Is there a ActiveSheet.ActivateNext
>>
>>
>> --
>> Esau

>
>



 
Reply With Quote
 
Ron de Bruin
Guest
Posts: n/a
 
      21st Nov 2007
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" <(E-Mail Removed)> wrote in message news747036B-F0BC-4D4E-8CC3-(E-Mail Removed)...
> ActiveWindow.ActivateNext ----Is there a ActiveSheet.ActivateNext
>
>
> --
> Esau

 
Reply With Quote
 
Rick Rothstein \(MVP - VB\)
Guest
Posts: n/a
 
      21st Nov 2007
>> 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

 
Reply With Quote
 
Rick Rothstein \(MVP - VB\)
Guest
Posts: n/a
 
      21st Nov 2007
> 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 With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off



Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 10:57 PM.