+ Reply to Thread
Results 1 to 10 of 10

How to return to "original" sheet after using a link to a other sheets?

  1. #1
    Registered User
    Join Date
    11-10-2007
    Location
    Sweden
    Posts
    32

    How to return to "original" sheet after using a link to a other sheets?

    I have a workbook with about 200 sheets.
    Each sheet contains lots of links to the other sheets, so the user can clink the link and then go to the new sheet.

    But, how do I make a "return-function"? That can return the user to the sheet that was active before the link was followed? If possible I would like this do be doable for 5-10 sheets back.

    This "return-function" is gonna be used by clicking a button on a floating toolbar I have connected to the sheet. (This I dont need help with, just the "return-function").

    Would very much appreciate help with this.
    Best regards

  2. #2
    Registered User
    Join Date
    06-12-2008
    Location
    Newbury
    MS-Off Ver
    Office 365 ProPlus
    Posts
    92
    You could use an array for this. On the open event of the workbook use the activesheet.name to add this to the array and then using the SheetActivate event add sh.name to the array each time. This in combination with some sort of counter should allow you to achieve what you want.

  3. #3
    Registered User
    Join Date
    11-10-2007
    Location
    Sweden
    Posts
    32
    Hi Chergh
    Thanks for your replay

    I understand what you mean. But I am unsure about the coding, how to do it.

  4. #4
    Registered User
    Join Date
    06-12-2008
    Location
    Newbury
    MS-Off Ver
    Office 365 ProPlus
    Posts
    92
    I'm not sure how to code it yet myself and would need to give it a good bit of thought, so I will need to wait till I'm not at work.

  5. #5
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200
    This is a bit confusing. Are you using hyperlinks to move to a sheet or VBA?

    If you are using VBA then you capture the active sheet's name in a variable, then use this in your go back to code
    Please Login or Register  to view this content.
    Why do you need 200 sheets, seems excessive to me.
    Last edited by royUK; 06-17-2008 at 07:03 AM.
    Hope that helps.

    RoyUK
    --------
    For Excel Tips & Solutions, free examples and tutorials why not check out my web site

    Free DataBaseForm example

  6. #6
    Registered User
    Join Date
    11-10-2007
    Location
    Sweden
    Posts
    32
    Quote Originally Posted by royUK
    This is a bit confusing. Are you using hyperlinks to move to a sheet or VBA?

    If you are using VBA then you capture the active sheet's name in a variable, then use this in your go back to code
    Please Login or Register  to view this content.
    Why do you need 200 sheets, seems excessive to me.

    Hi royUK

    The workbook was this way when I got it, with many sheets that is.
    I will get more workbooks like this so I guess I just have to deal with it this way.

    The links are just simple hyperlinks, not written or done with any VBA.

  7. #7
    Forum Expert
    Join Date
    01-03-2006
    Location
    Waikato, New Zealand
    MS-Off Ver
    2010 @ work & 2007 @ home
    Posts
    2,243
    hi,
    This reply is off-topic but I agree with Roy that 200 sheets does seem excessive. Now, with absolutely no knowledge of your workbook content/purpose...

    If at all possible/suitable (are the sheets data for different areas etc?) I would suggest consolidating them into fewer sheets in a "database format" & using filters + subtotals or even pivot tables to summarise the data.

    The workbook was this way when I got it, with many sheets that is.
    I will get more workbooks like this so I guess I just have to deal with it this way.
    If these spreadsheets are coming "internally" from your workplace (& you are becoming responsible for them?) it may be worth redesigning/suggesting they are redesigned. Here is a page with a number of links that may be useful:

    http://www.eusprig.org/#DOWNLOADS
    Including one that I have found very useful in developing Templates from scratch
    http://www.eusprig.org/smbp.pdf

    Another page with some good suggestions for spreadsheet design is:
    http://www.mang.canterbury.ac.nz/peo...ets/index.html

    hth
    Rob
    Rob Brockett
    Kiwi in the UK
    Always learning & the best way to learn is to experience...

  8. #8
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200
    If you aren't using code then you I don't think you can return to the last sheet.

    You mentioned that you were using a "floating toolbar" which has to use VBA code.

    Read this page, there's some code to create a hyperlinked index page 7 an addin that will allow you to navigate from sheet to sheet.

  9. #9
    Registered User
    Join Date
    11-10-2007
    Location
    Sweden
    Posts
    32
    Quote Originally Posted by royUK
    If you aren't using code then you I don't think you can return to the last sheet.

    You mentioned that you were using a "floating toolbar" which has to use VBA code.

    Read this page, there's some code to create a hyperlinked index page 7 an addin that will allow you to navigate from sheet to sheet.
    Thank you.
    I will be looking into the toolbar, see if I can use it somehow.

    broro183, I also want to thank you for the links.

    I will get back here in the thread how it goes

  10. #10
    Registered User
    Join Date
    11-10-2007
    Location
    Sweden
    Posts
    32
    Quote Originally Posted by royUK
    This is a bit confusing. Are you using hyperlinks to move to a sheet or VBA?

    If you are using VBA then you capture the active sheet's name in a variable, then use this in your go back to code
    Please Login or Register  to view this content.
    Why do you need 200 sheets, seems excessive to me.

    Is it possible for me to use this code, or anything like this?
    If so, where to put the code so it is executed every time a new sheet in the workbook is activated?

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1