+ Reply to Thread
Results 1 to 5 of 5

code to center active cell on screen

  1. #1
    Valued Forum Contributor
    Join Date
    11-27-2013
    Location
    Waterbury, CT
    MS-Off Ver
    Office 365
    Posts
    1,175

    code to center active cell on screen

    Hi Excel Forum?
    I found this code somewhere online that when you activate a sheet it will center the active cell in the middle of the screen.
    Please Login or Register  to view this content.
    However, this does not work when i click on a hyperlink that's on Sheet2 which refers to Sheet1. For some reason the code does not process the clicking-on-a-hyperlink as a method of activating the sheet.
    Is there any way around this issue?
    Any help will be greatly appreciated.

    Thanks in advance

  2. #2
    Forum Expert
    Join Date
    12-24-2007
    Location
    Alsace - France
    MS-Off Ver
    MS 365 Office Suite
    Posts
    5,097

    Re: code to center active cell on screen

    Try
    Else send a sample of your file
    Please Login or Register  to view this content.
    Attached Files Attached Files
    Last edited by PCI; 12-03-2014 at 04:34 PM.
    - Battle without fear gives no glory - Just try

  3. #3
    Valued Forum Contributor
    Join Date
    11-27-2013
    Location
    Waterbury, CT
    MS-Off Ver
    Office 365
    Posts
    1,175

    Re: code to center active cell on screen

    Thanks PCI.
    Just a couple little issues, your code is forcing the link to go to Sheet2/cell O22 instead of cell A22. And although your code did center the cell when i clicked on your link it did not center onto the cell when i click on a hyperlink formula.
    See sample file CenterCell.xlsm

    Thanks!

  4. #4
    Forum Expert
    Join Date
    12-24-2007
    Location
    Alsace - France
    MS-Off Ver
    MS 365 Office Suite
    Posts
    5,097

    Re: code to center active cell on screen

    Try next code which seems working for an unknown reason (for me)
    Please Login or Register  to view this content.

  5. #5
    Valued Forum Contributor
    Join Date
    11-27-2013
    Location
    Waterbury, CT
    MS-Off Ver
    Office 365
    Posts
    1,175

    Re: code to center active cell on screen

    Thanks PCI. Unfortunately it's still not working for me

+ 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. Active cell moves off the screen
    By John W. in forum Excel General
    Replies: 3
    Last Post: 08-22-2020, 09:19 AM
  2. hyperlink to a cell but have it center on screen
    By garywilson4 in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 02-26-2012, 03:58 AM
  3. Make Active Cell be at the Top of the Screen
    By Gos-C in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 09-15-2010, 12:47 PM
  4. Making comments appear in the center of the screen.
    By Tonso in forum Excel General
    Replies: 5
    Last Post: 06-03-2009, 05:36 PM
  5. Replies: 1
    Last Post: 04-19-2006, 10:10 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