+ Reply to Thread
Results 1 to 6 of 6

Same Location In ALL Worksheets

  1. #1
    Registered User
    Join Date
    11-16-2004
    Posts
    38

    Same Location In ALL Worksheets

    Hello,

    Is there some trick or otherwise, so that when moving from worksheet to worksheet,
    the page (screen) and the cursor (highlighted cell) is positioned the same in every worksheet?

    I have workbooks that have multiple worksheets that are formatted/coded identically, but each has different data.

    When I jump from worksheet to worksheet, looking for data in the same cell, I find it very cumbersome to then have to
    scroll left/right/up/down to get to the cell of interest.

  2. #2
    Forum Expert
    Join Date
    12-14-2012
    Location
    London England
    MS-Off Ver
    MS 365 Office Suite.
    Posts
    8,448

    Re: Same Location In ALL Worksheets

    Try Pasting this code into the "ThisWorkbook" macromodule of your workbook

    Please Login or Register  to view this content.
    My General Rules if you want my help. Not aimed at any person in particular:

    1. Please Make Requests not demands, none of us get paid here.

    2. Check back on your post regularly. I will not return to a post after 4 days.
    If it is not important to you then it definitely is not important to me.

  3. #3
    Registered User
    Join Date
    11-16-2004
    Posts
    38

    Re: Same Location In ALL Worksheets

    Thanks mehmetcik

    I copy/pasted your code in ThisWorkbook module, and it is not working.
    I do see what the code is supposed to be doing however.
    Perhaps I have done something wrong.

    As a test I added a MsgBox in the Workbook_Open sub, and it displays when the Workbook opens.

  4. #4
    Forum Expert
    Join Date
    12-14-2012
    Location
    London England
    MS-Off Ver
    MS 365 Office Suite.
    Posts
    8,448

    Re: Same Location In ALL Worksheets

    Sorry.

    Lets try again.

    Paste this code in a standard module
    Please Login or Register  to view this content.

    Paste this code into the ThisWorkbook Module
    Please Login or Register  to view this content.
    Attached Files Attached Files
    Last edited by mehmetcik; 11-26-2020 at 06:44 PM.

  5. #5
    Forum Expert
    Join Date
    07-06-2004
    Location
    Northern California
    MS-Off Ver
    2K, 2003, 2010, O365
    Posts
    1,490

    Re: Same Location In ALL Worksheets

    Another way using event handlers. I'll assume you don't need a Workbook_Open event handler and are content to open workbooks in the location they were last saved.

    The following should be in ThisWorkbook.

    Please Login or Register  to view this content.
    The problem with Workbook_SheetDeactivate is that which Sh may refer to the worksheet the user just left, you need to save window properties from that worksheet to apply to the newly activated worksheet, and that requires going back to Sh in ActiveWindow, storing its top-left cell's and ActiveCell's addresses, the returning to the selected sheets and ActiveSheet.

  6. #6
    Registered User
    Join Date
    11-16-2004
    Posts
    38

    Re: Same Location In ALL Worksheets

    Thanks to both!

    Both solutions give me what I want.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Using COUNTIF across multiple worksheets to cross-reference age & location
    By Lemmiwinks in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 04-05-2019, 03:21 PM
  2. [SOLVED] Macro to save selected worksheets as workbooks in variable location
    By Groovicles in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 08-25-2015, 10:32 AM
  3. Cell referencing two worksheets based on a name or location
    By QuintonMcCloud in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 07-24-2015, 05:37 AM
  4. [SOLVED] Find lowest value in corresponding cells on multiple worksheets. Return value & location.
    By WORKINGBEE in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 02-21-2013, 01:33 PM
  5. Replies: 2
    Last Post: 10-02-2007, 11:41 PM
  6. Replies: 1
    Last Post: 06-30-2006, 11:30 AM
  7. Cope worksheets and save to location
    By ozcank in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-24-2005, 11:14 AM

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