+ Reply to Thread
Results 1 to 16 of 16

Excel 2007 : Excel Shortcut- switch to previous sheet

  1. #1
    Registered User
    Join Date
    12-01-2009
    Location
    Semarang
    MS-Off Ver
    Excel 2007
    Posts
    9

    Excel Shortcut- switch to previous sheet

    I wanted a shortcut that moved between the last two sheets selected.

    Similar to how Alt+Tab works with windows.

    example: I have Sheet1 until Sheet 10, I work in Sheet2 then I switch my work to Sheet10, I want to back to Sheet2 quickly by using shortcut. Not use CTRL + PageUp because it just move to one previous sheet from Sheet10 to Sheet9.
    Its really helpful if we have many sheet & need to work quickly.

    Thanks

  2. #2
    Forum Expert teylyn's Avatar
    Join Date
    10-28-2008
    Location
    New Zealand
    MS-Off Ver
    Excel 365 Insider Fast
    Posts
    11,372

    Re: Excel Shortcut- switch to previous sheet

    Ctrl-PgDwn for sheet forward
    Ctrl-PgUp for sheet back

    Ctrl-tab for next workbook
    Ctrl-Shift-tab for previous workbook


    edit: OK, I see you dont't want to use Ctrl - PageUp. As an alternative, create an index sheet that lists all sheets in the book. Have a link to the index sheet on all other sheets (maybe in row 1 and freeze panes after row 1). On the index sheet have hyperlinks to all sheets in the workbook. Now, navigating to any of the sheets is just two clicks away - 1st click to index sheet -- 2nd click to desired target sheet

    hth
    Last edited by teylyn; 12-01-2009 at 07:01 AM.

  3. #3
    Registered User
    Join Date
    12-01-2009
    Location
    Semarang
    MS-Off Ver
    Excel 2007
    Posts
    9

    Re: Excel Shortcut- switch to previous sheet

    Quote Originally Posted by teylyn View Post

    edit: OK, I see you dont't want to use Ctrl - PageUp. As an alternative, create an index sheet that lists all sheets in the book. Have a link to the index sheet on all other sheets (maybe in row 1 and freeze panes after row 1). On the index sheet have hyperlinks to all sheets in the workbook. Now, navigating to any of the sheets is just two clicks away - 1st click to index sheet -- 2nd click to desired target sheet

    hth
    thanks before, yes we can create index and use hyperlink, but the point is there any shortcut for swith between last 2 selected sheet?

  4. #4
    Forum Expert teylyn's Avatar
    Join Date
    10-28-2008
    Location
    New Zealand
    MS-Off Ver
    Excel 365 Insider Fast
    Posts
    11,372

    Re: Excel Shortcut- switch to previous sheet

    not in native Excel. But maybe possible with some VBA tricks (out of my league, I'm afraid)

  5. #5
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: Excel Shortcut- switch to previous sheet

    You would need VBA, perhaps something like the below (to reside in ThisWorkbook)

    Please Login or Register  to view this content.
    assign PriorSheet to a key shortcut of choice (via ALT + F8 in Native XL)
    Last edited by DonkeyOte; 12-01-2009 at 07:27 AM. Reason: added workbook test

  6. #6
    Valued Forum Contributor rwgrietveld's Avatar
    Join Date
    09-02-2008
    Location
    Netherlands
    MS-Off Ver
    XL 2007 / XL 2010
    Posts
    1,671

    Re: Excel Shortcut- switch to previous sheet

    If this is VERY important to you, you might make an add-in.

    here is a start (quick). let us know if this is the way forward.

    1) all sheets are displayed
    2) Click one and that sheet is selected (not working yet)

    use the picture I have provided.

    Please Login or Register  to view this content.
    To test:
    Make a userform. Put this code in and make sure that this link is correct:

    "C:\...\Sht.bmp"
    Attached Images Attached Images
    Attached Files Attached Files
    Looking for great solutions but hate waiting?
    Seach this Forum through Google

    www.Google.com
    (e.g. +multiple +IF site:excelforum.com/excel-general/ )

    www.Google.com
    (e.g. +fill +combobox site:excelforum.com/excel-programming/ )

    Ave,
    Ricardo

  7. #7
    Registered User
    Join Date
    12-01-2009
    Location
    Semarang
    MS-Off Ver
    Excel 2007
    Posts
    9

    Re: Excel Shortcut- switch to previous sheet

    Quote Originally Posted by DonkeyOte View Post
    You would need VBA, perhaps something like the below (to reside in ThisWorkbook)

    Please Login or Register  to view this content.
    assign PriorSheet to a key shortcut of choice (via ALT + F8 in Native XL)
    I can not run it, because have error in Then Prior.Select
    Notification "Object Variable or With Block Variable not set"
    In fact i quite not familiar with VBA...

  8. #8
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: Excel Shortcut- switch to previous sheet

    You have to make sure there was a prior sheet:
    Please Login or Register  to view this content.
    Entia non sunt multiplicanda sine necessitate

  9. #9
    Registered User
    Join Date
    12-01-2009
    Location
    Semarang
    MS-Off Ver
    Excel 2007
    Posts
    9

    Re: Excel Shortcut- switch to previous sheet

    Quote Originally Posted by rwgrietveld View Post
    If this is VERY important to you, you might make an add-in.

    here is a start (quick). let us know if this is the way forward.

    1) all sheets are displayed
    2) Click one and that sheet is selected (not working yet)

    use the picture I have provided.

    Please Login or Register  to view this content.
    To test:
    Make a userform. Put this code in and make sure that this link is correct:

    "C:\...\Sht.bmp"
    I already tried to run it in VBA user form and appear form like in the attachment with list of all sheet, but i can not do anything after that, can not click the sheet even select the cell to work, is there something wrong when i run this?
    Attached Images Attached Images

  10. #10
    Valued Forum Contributor rwgrietveld's Avatar
    Join Date
    09-02-2008
    Location
    Netherlands
    MS-Off Ver
    XL 2007 / XL 2010
    Posts
    1,671

    Re: Excel Shortcut- switch to previous sheet

    You did nothing wrong. It is as it is. My question was:
    here is a start (quick). let us know if this is the way forward
    Is this something you can use. A few steps need to be done, but I was short in time to finish and wanted to know if this is a preferred solution?

  11. #11
    Registered User
    Join Date
    12-01-2009
    Location
    Semarang
    MS-Off Ver
    Excel 2007
    Posts
    9

    Re: Excel Shortcut- switch to previous sheet

    Quote Originally Posted by rwgrietveld View Post
    You did nothing wrong. It is as it is. My question was:

    Is this something you can use. A few steps need to be done, but I was short in time to finish and wanted to know if this is a preferred solution?
    Actually I just want to use a simple short cut, it sound lazy thing but very useful for me in same case, so i think the conclusion is no short cut for switch between last two sheets selected and we need to create macro / VBA code for this. By the way, many thank for the sharing, I will learn to use macro / VBA first.

  12. #12
    Forum Expert teylyn's Avatar
    Join Date
    10-28-2008
    Location
    New Zealand
    MS-Off Ver
    Excel 365 Insider Fast
    Posts
    11,372

    Re: Excel Shortcut- switch to previous sheet

    fua, DonkeyOte's suggestion and shg's version work. you just have to click another worksheet before you use the keyboard shortcut, so that Excel has a sheet to go back to!!. If you just install the macro and then hit the shortcut, without clicking another sheet, there is nothing that Excel can go back to.

    Try it!

  13. #13
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: Excel Shortcut- switch to previous sheet

    Quote Originally Posted by Teylyn
    DonkeyOte's suggestion and shg's version work
    Being honest my code would have debugged should no prior sheet have existed at run time whereas shg's modified version would not - so in short use that rather than mine.

  14. #14
    Registered User
    Join Date
    12-01-2009
    Location
    Semarang
    MS-Off Ver
    Excel 2007
    Posts
    9

    Re: Excel Shortcut- switch to previous sheet

    Quote Originally Posted by teylyn View Post
    fua, DonkeyOte's suggestion and shg's version work. you just have to click another worksheet before you use the keyboard shortcut, so that Excel has a sheet to go back to!!. If you just install the macro and then hit the shortcut, without clicking another sheet, there is nothing that Excel can go back to.

    Try it!
    Thanks all, finally it's work. As you say use shg's work and need to to click another worksheet before use the keyboard shortcut. At first time, i directly assign shortcut, so nothing happen.
    I have other question, how to apply this macro for all workbook, so i don't need to create macro in each workbook and when i open new workbook automatically can use this function?

    Thanks

  15. #15
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: Excel Shortcut- switch to previous sheet


  16. #16
    Registered User
    Join Date
    12-01-2009
    Location
    Semarang
    MS-Off Ver
    Excel 2007
    Posts
    9

    Re: Excel Shortcut- switch to previous sheet

    I already tried to create PERSONAL.XLS with macro inside it. Now when i open new book then automatically named PERSONAL.XLS (previously default is Book1). I test the macro still can be run then i save to other file name called it test.XLS and still can run the macro, but when i close test.XLS file and i open it again there will be 2 excel file opened, fisrt PERSONAL.XLS and second test.XLS and macro can not be run in test.XLS file. Is there something problem or its really work like that?

+ 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