Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Excel / New Users / July 2006

Tip: Looking for answers? Try searching our database.

go to sheet number

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
John - 24 Jul 2006 17:46 GMT
Errors are given in sheet numbers but the sheets have names not numbers.

How do you "go to" a sheet number? I have about 200 in a workbook.

Thanks
John
Chip Pearson - 24 Jul 2006 17:53 GMT
You can access a sheet by its position number. E.g.,

Sheets(10).Activate

Signature

Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com

> Errors are given in sheet numbers but the sheets have names not
> numbers.
[quoted text clipped - 4 lines]
> Thanks
> John
John - 24 Jul 2006 18:20 GMT
I didn't mean in vb. I'm in the workbook and want to go to sheet #32 but
the sheets only have names on them... no numbers.

Thanks
John

> You can access a sheet by its position number. E.g.,
>
> Sheets(10).Activate
Chip Pearson - 24 Jul 2006 18:26 GMT
There is no way to go to a sheet based on its index number
without using VBA or manually counting over that many sheets.

You could use the following macro and assign it to a shortcut
key.

Sub GoToSheetNumber()
   Dim N As Long
   N = Application.InputBox(prompt:="Enter a sheet number",
Type:=1)
   If N < 1 Or N > Sheets.Count Then
       MsgBox "Invalid sheet number"
   Else
       Sheets(N).Select
   End If
End Sub

Signature

Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com

>I didn't mean in vb. I'm in the workbook and want to go to sheet
>#32 but the sheets only have names on them... no numbers.
[quoted text clipped - 5 lines]
>>
>> Sheets(10).Activate
John - 24 Jul 2006 18:57 GMT
They are listed in the project window in vb thank God and easy to select
and go to. It also lists there all your vb modules but, of course, by
number not name. It's as if the designers purposely made it as obscure
as possible navigating around your workbooks.

I exported all my modules and renamed them and loaded them again so I
could identify them easily. MS promptly renamed them by module numbers.

John

> There is no way to go to a sheet based on its index number
> without using VBA or manually counting over that many sheets.
[quoted text clipped - 12 lines]
>     End If
> End Sub
SteveW - 24 Jul 2006 19:29 GMT
> They are listed in the project window in vb thank God and easy to select  
> and go to. It also lists there all your vb modules but, of course, by  
[quoted text clipped - 3 lines]
> I exported all my modules and renamed them and loaded them again so I  
> could identify them easily. MS promptly renamed them by module numbers.

You can just rename them - F4 - alter properties

> John
>
[quoted text clipped - 10 lines]
>>     End If
>> End Sub

Signature

Steve (3)


Rate this thread:






 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.