LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 24
Default Selecting Sheet By Codename

I have a spreadsheet with multiple layers of sheets, where I have used the
Sheet Name to give a Description meaningful to other users, but have a
separate codename that uses a numbering system, which should allow a
button/macro to step up through the layers.

In an earlier version the Sheet Name was linked to the Codename, but I now
have too many layers & variations in Sheet names to manage easily.
Example of problem and Code below

Is anyone able to advise where I need to make some mods for it to work?

Thanks very much

Kris

Example Sheet Structure
Sheet Codename
Main A
Mgmt Processes A_01
Project Activites A_02
Mgmt Proc 1 A_01_01
Proj Act 1 A_02_01
Proj Act 2 A_02_02
Proj Act 2a A_02_02_01
Proj Act 2b A_02_02_02

Sub Go_Home()
'Returns to Section Sheet if ActiveSheet is a Sub-Sheet _
Else Returns to Main Sheet
If Len(ActiveSheet.CodeName) 1 And Left(ActiveSheet.CodeName, 1) =
"A" Then
ToSheet = Left(ActiveSheet.CodeName, Len(ActiveSheet.CodeName) - 3)
ToSheet.Select
Else
A.Select
End If
End Sub

The macro then allows user to return to Proj Activities from Proj Act 2,
regardless of ordering of sheets or Sheet Name.

Of Course the Sheet Naming isnt anything close to being as friendly as that
above, but hope it makes it easier to undertand
 
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
Using CodeName when Selecting Multi-Tabs Dean Excel Programming 5 March 17th 10 08:32 PM
Hide sheet via codename [email protected] Excel Programming 3 September 13th 06 08:28 PM
Use of sheet codename in codeline - How? Jim May Excel Programming 3 July 1st 06 04:24 PM
change sheet codename Gary Keramidas Excel Programming 4 March 5th 06 12:54 AM
Selecting a sheet by codename Dr.Schwartz Excel Programming 3 September 3rd 04 02:15 PM


All times are GMT +1. The time now is 05:07 AM.

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

About Us

"It's about Microsoft Excel"