Consulting

Results 1 to 5 of 5

Thread: Solved: Bringing a selected cell to the top of the screen

  1. #1
    VBAX Regular
    Joined
    Aug 2006
    Posts
    6
    Location

    Solved: Bringing a selected cell to the top of the screen

    Goal: Find and present in the active window, automatially, a particular cell in a worksheet.

    Currently, on a Before Double Click, I have some code that finds the original source (meaning worksheet and cell) of the value from my target cell (which is generally in a different worksheet). Although I can Select the source cell, it doesn't come into focus on the source work sheet window because there could be thousands of rows of data. What syntax/functions can I use to bring the cell (by scrolling or whatever means) into the active window? Right now the user has to scroll around and hope to see the cell in focus.

    Any tips are welcome!

  2. #2
    Mac Moderator VBAX Guru mikerickson's Avatar
    Joined
    May 2007
    Location
    Davis CA
    Posts
    2,778
    Application.Goto Reference:=Range("AA108")
    will put AA108 on the screen. Which edge or corner of the screen will depend on what is on the screen before that line runs.

  3. #3
    Administrator
    VP-Knowledge Base
    VBAX Grand Master mdmackillop's Avatar
    Joined
    May 2004
    Location
    Scotland
    Posts
    14,489
    Location
    [VBA]ActiveWindow.Scrollrow = 10[/VBA]
    MVP (Excel 2008-2010)

    Post a workbook with sample data and layout if you want a quicker solution.


    To help indent your macros try Smart Indent

    Please remember to mark threads 'Solved'

  4. #4
    VBAX Regular
    Joined
    Aug 2006
    Posts
    6
    Location
    Thanks for the help!

  5. #5
    VBAX Regular
    Joined
    Aug 2006
    Posts
    6
    Location
    Works great. I completely missed this in my books.
    Thanks

Posting Permissions

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