+ Reply to Thread
Results 1 to 13 of 13

Opening worksheet at the same cell and page every time

  1. #1
    Registered User
    Join Date
    01-26-2013
    Location
    Harare,Zimbabwe
    MS-Off Ver
    Excel 2010
    Posts
    46

    Opening worksheet at the same cell and page every time

    I would like to know if its possible to open a work sheet excel 2010 on the same page and same cell everytime you open the work book.

    I have an Index sheet and would like the saved document to open on the index page every time I open it even if I have not saved the work book on the index page


    Thanks

    Rodney

  2. #2
    Valued Forum Contributor
    Join Date
    03-29-2013
    Location
    United Kingdom
    MS-Off Ver
    Office/Excel 2013
    Posts
    1,749

    Re: Opening worksheet at the same cell and page every time

    Adjust the sheet number and the cell location to the following code and put it in a code module in the VBE.

    Please Login or Register  to view this content.

  3. #3
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: Opening worksheet at the same cell and page every time

    wouldnt that have to be in the workbook module ?
    Please Login or Register  to view this content.
    "Unless otherwise stated all my comments are directed at OP"

    Mojito connoisseur and now happily retired
    where does code go ?
    look here
    how to insert code

    how to enter array formula

    why use -- in sumproduct
    recommended reading
    wiki Mojito

    how to say no convincingly

    most important thing you need
    Martin Wilson: SPV
    and RSMBC

  4. #4
    Forum Guru HaHoBe's Avatar
    Join Date
    02-19-2005
    Location
    Hamburg, Germany
    MS-Off Ver
    work: 2016 on Win10 (notebook), private: 365 on Win11 (desktop), 2019 on Win11 (notebook)
    Posts
    8,198

    Re: Opening worksheet at the same cell and page every time

    Hi, Martin,

    both Auto_Open and Auto_Close from the pre-97 area are still supported if found in standard/normal modules. Code gets fired after the Workkbook_Open-Event AFAIR.

    Ciao,
    Holger
    Use Code-Tags for showing your code: [code] Your Code here [/code]
    Please mark your question Solved if there has been offered a solution that works fine for you

  5. #5
    Valued Forum Contributor
    Join Date
    03-29-2013
    Location
    United Kingdom
    MS-Off Ver
    Office/Excel 2013
    Posts
    1,749

    Re: Opening worksheet at the same cell and page every time

    It works from a code module too ... I think it get's higher priority when in the workbook module but then i think there is also a workbook_open sub ..

  6. #6
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: Opening worksheet at the same cell and page every time

    yep i just tried it and agree with you all.

  7. #7
    Registered User
    Join Date
    01-26-2013
    Location
    Harare,Zimbabwe
    MS-Off Ver
    Excel 2010
    Posts
    46

    Re: Opening worksheet at the same cell and page every time

    Sorry to Sound really stupid but how do I put this code into the VBE

  8. #8
    Valued Forum Contributor
    Join Date
    03-29-2013
    Location
    United Kingdom
    MS-Off Ver
    Office/Excel 2013
    Posts
    1,749

    Re: Opening worksheet at the same cell and page every time

    1. Right click on any worksheet tab
    2. Select "View Code"
    The VB editor window opens to display the associated VBA
    3. Right click on the VBA project listed at the left which corresponds to your workbook name
    4. Select Insert
    5. Select Module

    Then copy/paste the code into the module

    To run the code you can either close/open the workbook or run the macro directly.

  9. #9
    Registered User
    Join Date
    01-26-2013
    Location
    Harare,Zimbabwe
    MS-Off Ver
    Excel 2010
    Posts
    46

    Re: Opening worksheet at the same cell and page every time

    Thank you! This worked perfectly for me.

  10. #10
    Registered User
    Join Date
    01-26-2013
    Location
    Harare,Zimbabwe
    MS-Off Ver
    Excel 2010
    Posts
    46

    Re: Opening worksheet at the same cell and page every time

    Quote Originally Posted by AndyLitch View Post
    1. Right click on any worksheet tab
    2. Select "View Code"
    The VB editor window opens to display the associated VBA
    3. Right click on the VBA project listed at the left which corresponds to your workbook name
    4. Select Insert
    5. Select Module

    Then copy/paste the code into the module

    To run the code you can either close/open the workbook or run the macro directly.
    Sorry to be re visiting this but It suddenly stopped working. I added hyper links today and now where I save and close the workbook this is where it opens. I removed the module saved and closed and then re inserted with no change. Is there anything else I should check

  11. #11
    Valued Forum Contributor
    Join Date
    03-29-2013
    Location
    United Kingdom
    MS-Off Ver
    Office/Excel 2013
    Posts
    1,749

    Re: Opening worksheet at the same cell and page every time

    Check your Excel settings and make sure that macro's are enabled.
    1. File --> Options --> Trust Center
    2. Hit the "Trust Centre Settings" Button
    3. Go to "Macro Settings" and adjust them to ensure they are allowed to run.
    Elegant Simplicity............. Not Always

  12. #12
    Registered User
    Join Date
    01-26-2013
    Location
    Harare,Zimbabwe
    MS-Off Ver
    Excel 2010
    Posts
    46

    Re: Opening worksheet at the same cell and page every time

    Thank you very much problem solved

  13. #13
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,167

    Re: Opening worksheet at the same cell and page every time

    I have marked the thread as solved for you as you will not be able to do it. Please mark your threads as solved in future.
    If I have helped, Don't forget to add to my reputation (click on the star below the post)
    Don't forget to mark threads as "Solved" (Thread Tools->Mark thread as Solved)
    Use code tags when posting your VBA code: [code] Your code here [/code]

+ 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