#1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 222
Default Sort Worksheets

I have a WorkBook with 200+ Worksheets. I sort these A-Z with a VBA code.

Somewhere I read a tip on how to GoTo a Worksheet directly without scrolling
the Tabs. Am I dreaming?

Bob M.

  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 8,520
Default Sort Worksheets

Try one of these macros....

'Enter exact sheet name
Sub Macro1()
Dim strSheet As String, ws As Worksheet
strSheet = InputBox("Enter Sheet Name")

On Error Resume Next
Set ws = Sheets(strSheet)

If ws Is Nothing Then
MsgBox "Cannot find the sheet"
Else
Sheets(strSheet).Activate
End If

End Sub


'Enter a string..which match the sheetname
Sub Macro2()
Dim strSheet As String, ws As Worksheet
strSheet = InputBox("Enter Search String")
For Each ws In Sheets
If ws.Name Like "*" & strSheet & "*" Then ws.Activate: Exit Sub
Next
MsgBox "Cannot find a sheet with search string " & strSheet
End Sub

--
Jacob


"robert morris" wrote:

I have a WorkBook with 200+ Worksheets. I sort these A-Z with a VBA code.

Somewhere I read a tip on how to GoTo a Worksheet directly without scrolling
the Tabs. Am I dreaming?

Bob M.

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 8,520
Default Sort Worksheets

If you are new to macros..

--Set the Security level to low/medium in (Tools|Macro|Security).
--From workbook launch VBE using short-key Alt+F11.
--From menu 'Insert' a module and paste the below code.
--Get back to Workbook.
--Run macro from Tools|Macro|Run <selected macro()

--
Jacob


"robert morris" wrote:

I have a WorkBook with 200+ Worksheets. I sort these A-Z with a VBA code.

Somewhere I read a tip on how to GoTo a Worksheet directly without scrolling
the Tabs. Am I dreaming?

Bob M.

  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 18
Default Sort Worksheets

Well you can right click on the 4 x Navigation Arrows at the bottom left of
the screen and get a list of all the worksheets although it only displays 15
at a time ...

"robert morris" wrote:

I have a WorkBook with 200+ Worksheets. I sort these A-Z with a VBA code.

Somewhere I read a tip on how to GoTo a Worksheet directly without scrolling
the Tabs. Am I dreaming?

Bob M.

  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 226
Default Sort Worksheets


don't know what you saw, maybe right click the navigation arrows and select
it from the list.
--


Gary Keramidas
Excel 2003


"robert morris" wrote in message
...
I have a WorkBook with 200+ Worksheets. I sort these A-Z with a VBA code.

Somewhere I read a tip on how to GoTo a Worksheet directly without
scrolling
the Tabs. Am I dreaming?

Bob M.




  #6   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 222
Default Sort Worksheets

Jacob,

Thanks for your reply. I am familar with VBA. I will try your code and let
you know the result. Today however is a really loaded work day.

Thanks,

Bob. M.

"Jacob Skaria" wrote:

Try one of these macros....

'Enter exact sheet name
Sub Macro1()
Dim strSheet As String, ws As Worksheet
strSheet = InputBox("Enter Sheet Name")

On Error Resume Next
Set ws = Sheets(strSheet)

If ws Is Nothing Then
MsgBox "Cannot find the sheet"
Else
Sheets(strSheet).Activate
End If

End Sub


'Enter a string..which match the sheetname
Sub Macro2()
Dim strSheet As String, ws As Worksheet
strSheet = InputBox("Enter Search String")
For Each ws In Sheets
If ws.Name Like "*" & strSheet & "*" Then ws.Activate: Exit Sub
Next
MsgBox "Cannot find a sheet with search string " & strSheet
End Sub

--
Jacob


"robert morris" wrote:

I have a WorkBook with 200+ Worksheets. I sort these A-Z with a VBA code.

Somewhere I read a tip on how to GoTo a Worksheet directly without scrolling
the Tabs. Am I dreaming?

Bob M.

  #7   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 22,906
Default Sort Worksheets

You can right-click on the navigation arrows at bottom left and get a
list of 15 sheets and "more sheets" to choose from.

But with 200+ sheets.................

How about a sheet navigation toolbar from Dave Peterson?

http://www.contextures.on.ca/xlToolbar01.html

Or Bob Phillips' Browsesheets macro which I like best, but that's me<g

See this google search result. All one line for the URL

http://groups.google.com/group/micro...c19464f875bd25



Gord Dibben MS Excel MVP

On Thu, 18 Mar 2010 22:10:01 -0700, robert morris
wrote:

I have a WorkBook with 200+ Worksheets. I sort these A-Z with a VBA code.

Somewhere I read a tip on how to GoTo a Worksheet directly without scrolling
the Tabs. Am I dreaming?

Bob M.


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
Merge and Sort 2 worksheets into 3rd dc059 Excel Worksheet Functions 4 October 14th 08 11:58 PM
Sort Worksheets (without VB) Elgee Excel Worksheet Functions 4 August 16th 08 03:03 PM
sort problem with worksheets micks Excel Worksheet Functions 6 August 9th 05 10:42 AM
How do I sort Worksheets by name? M Skabialka New Users to Excel 4 April 7th 05 06:15 PM
Sort Worksheets mate Excel Worksheet Functions 2 March 24th 05 11:05 AM


All times are GMT +1. The time now is 04:56 AM.

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"