Solved

Display active cell in left center of screen

Posted on 2010-11-29
2
456 Views
Last Modified: 2012-05-10
On open in "thisworkbook", put cursor on one cell below last cell with data and make that cursor appear on left center of screen.  Thanks for your help!
0
Comment
Question by:1r3o2n8
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 85

Accepted Solution

by:
Rory Archibald earned 500 total points
ID: 34230234
Something like this:

Private Sub Workbook_Open()
    Dim rngVis As Range
    Dim lngRow As Long, lngCol As Long
    Dim win As Window
    
    ' assumes column A for data check
    lngCol = 1
    Set win = ThisWorkbook.Windows(1)
    With ThisWorkbook.ActiveSheet
        Set rngVis = win.VisibleRange
        Debug.Print rngVis.Address
        ' get last row with data in col A
        lngRow = .Cells(.Rows.Count, lngCol).End(xlUp).Row + 1
        .Cells(lngRow, lngCol).Select
    End With
    With win
        .ScrollColumn = lngCol
        .ScrollRow = Application.Max(lngRow - (rngVis.Rows.Count / 2), 1)
    End With
        
End Sub

Open in new window

0
 

Author Closing Comment

by:1r3o2n8
ID: 34232102
It executed perfectly the first time.  Thanks so much !
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This collection of functions covers all the normal rounding methods of just about any numeric value.
Deploying a Microsoft Access application in a Citrix environment is not difficult but takes a few steps. However, Citrix system people are often of little help, as they typically know next to nothing about Access. The script provided here will take …
The viewer will learn how to create two correlated normally distributed random variables in Excel, use a normal distribution to simulate the return on different levels of investment in each of the two funds over a period of ten years, and, create a …
This Micro Tutorial will demonstrate the scrolling table in Microsoft Excel using the INDEX function.

751 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question