Results 1 to 3 of 3
  1. #1
    New Lounger
    Join Date
    Dec 2008
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Panes and Scroll Into View? (Excel 2007)

    I have a worksheet with Freeze Panes applied. I need to scroll to the top-left cell in a pane and select that cell. Using VB.Net. I see the ScrollIntoView method, but can't seem to make that work... Also, SendKeys with ^{HOME} works only sometimes...

    Also, is there a best practice for getting the current pane (the one with the active selection)?

    Any suggestions would be greatly appreciated.

    Thanks!

  2. #2
    New Lounger
    Join Date
    Dec 2008
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Panes and Scroll Into View? (Excel 2007)

    I found that setting ScrollRow and ScrollColumn to 1 scroll the pane to the top-left corner. This helped. But I'd still be interested in knowing if you can get the range for the top-left cell in the pane (not the visible cell, but the one that the pane is "anchored" to).

    Thanks.

  3. #3
    New Lounger
    Join Date
    Dec 2008
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Panes and Scroll Into View? (Excel 2007)

    I found a solution, so I thought I'd share it in case others have this problem.

    First, set ScrollColumn and ScrollRow on the pane to 1. Then, get the first cell of the visible range using the pane's VisibleRange property. Once you have that cell, you can use the Select method to select it.

    If anyone knows of a better solution, please let me know.

    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
  •