Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11
Default Navigate Sheets - better way.

I want to navigate from one sheet to the other. Is there a better way then
this....

' Go back and format previous sheet.
Sheets(Worksheets.Count - 1).Select
' Format sheet.
Call SB2_Format
' Come back and start again.
Sheets(Worksheets.Count).Select


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Navigate Sheets - better way.

activesheet.previous.select
SB2_Format
ActiveSheet.Next.Select

Not sure if it makes any difference.

Another approach would be to modify SB2_format so you can pass a sheet
reference to it and it can format that sheet without activating it.
then the code could just be

set sh = Activesheet.Prevous
SB2_Format sh
--
Regards,
Tom Ogilvy

"Doug929" wrote in message
...
I want to navigate from one sheet to the other. Is there a better way then
this....

' Go back and format previous sheet.
Sheets(Worksheets.Count - 1).Select
' Format sheet.
Call SB2_Format
' Come back and start again.
Sheets(Worksheets.Count).Select




  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11
Default Navigate Sheets - better way.

Thanks Tom, you have been helping for years! I appreciate it.

"Tom Ogilvy" wrote:

activesheet.previous.select
SB2_Format
ActiveSheet.Next.Select

Not sure if it makes any difference.

Another approach would be to modify SB2_format so you can pass a sheet
reference to it and it can format that sheet without activating it.
then the code could just be

set sh = Activesheet.Prevous
SB2_Format sh
--
Regards,
Tom Ogilvy

"Doug929" wrote in message
...
I want to navigate from one sheet to the other. Is there a better way then
this....

' Go back and format previous sheet.
Sheets(Worksheets.Count - 1).Select
' Format sheet.
Call SB2_Format
' Come back and start again.
Sheets(Worksheets.Count).Select





Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Navigate in a big worksheet Rockbear Excel Discussion (Misc queries) 4 April 18th 08 04:02 PM
Ctrl+Page Down to navigate sheets TimT Excel Discussion (Misc queries) 1 May 30th 07 02:21 PM
Navigate by macro Frank Kabel Excel Programming 2 May 28th 04 04:38 PM
Macro to navigate between sheets Jonsson[_28_] Excel Programming 4 May 2nd 04 05:00 PM
Use list box to navigate to different sheets... MrAlMackay Excel Programming 6 July 20th 03 02:53 AM


All times are GMT +1. The time now is 02:41 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"