Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Display active cell in left center of screen

Posted on 2010-11-29
2
Medium Priority
?
470 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 2000 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

Three Reasons Why Backup is Strategic

Backup is strategic to your business because your data is strategic to your business. Without backup, your business will fail. This white paper explains why it is vital for you to design and immediately execute a backup strategy to protect 100 percent of your data.

Question has a verified solution.

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

When you see single cell contains number and text, and you have to get any date out of it seems like cracking our heads.
If you need to forecast numbers -- typically for finance -- the Windows and Mac versions of Excel 2016 have a basket of tools to get the job done.
The viewer will learn how to use a discrete random variable to simulate the return on an investment over a period of years, create a Monte Carlo simulation using the discrete random variable, and create a graph to represent the possible returns over…
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…

705 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