Consulting

Results 1 to 7 of 7

Thread: Solved: What Screen Am I Looking At Now?

  1. #1

    Solved: What Screen Am I Looking At Now?

    I asked this question a good while back and I used the response I was given at that time. Now I can't remember either the response or where I used it. One more time ...
    I'm looking at a portion of a worksheet on my screen. What is the VBA statement that will tell me where I am looking?

  2. #2
    Distinguished Lord of VBAX VBAX Grand Master Bob Phillips's Avatar
    Joined
    Apr 2005
    Posts
    25,453
    Location

  3. #3
    No, xld, that's not the one. It seems to me that the VBA statement I'm looking for returns some sheet coordinates, like the address of the upper left corner that's being displayed on the screen. I've done various searches, but I'm not using the correct keyword, whatever it is.

  4. #4
    Administrator
    VP-Knowledge Base
    VBAX Grand Master mdmackillop's Avatar
    Joined
    May 2004
    Location
    Scotland
    Posts
    14,489
    Location
    Any use?
    [VBA]With ActiveWindow
    MsgBox Cells(.ScrollRow, .ScrollColumn).address
    End With
    [/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'

  5. #5
    Malcolm, I don't think that's what I had in mind, but it DOES tell me what I want to know. Thanks for the response.
    I have a feeling that it was Killian who answered my last post ... Killian, are you listening?

  6. #6
    Administrator
    VP-Knowledge Base VBAX Grand Master mdmackillop's Avatar
    Joined
    May 2004
    Location
    Scotland
    Posts
    14,489
    Location
    For the range
    [VBA]
    MsgBox ActiveWindow.VisibleRange.address

    [/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'

  7. #7
    Malcolm, that's the one. You're probably the one who suggested it before, you dawg! This is a better solution since it provides a lower righthand corner address as well as the upper lefthand corner. Both techniques are subject to the limitation of a frozen screen and some others, but I'm aware of that. I really appreciate your assist.

Posting Permissions

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