Solved

Display active cell in left center of screen

Posted on 2010-11-29
2
430 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
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

Comprehensive Backup Solutions for Microsoft

Acronis protects the complete Microsoft technology stack: Windows Server, Windows PC, laptop and Surface data; Microsoft business applications; Microsoft Hyper-V; Azure VMs; Microsoft Windows Server 2016; Microsoft Exchange 2016 and SQL Server 2016.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
First Blank Cell in a range 7 35
highlight duplicate entry 16 30
ms office troubleshooting for users 8 36
Excel VBA When using VLookup 6 28
Introduction This Article briefly covers methods of calculating the NPV and IRR variants in Excel as well as the limitations in calculating and interpreting IRR results. Paraphrasing Richard Shockley, author of my favourite finance reference tex…
Many companies are making the switch from Microsoft to Google Apps (https://www.google.com/work/apps/business/). Use this article to learn more about what Google Apps has to offer and to help if you’re planning on migrating to Google Apps. It is …
The view will learn how to download and install SIMTOOLS and FORMLIST into Excel, how to use SIMTOOLS to generate a Monte Carlo simulation of 30 sales calls, and how to calculate the conditional probability based on the results of the Monte Carlo …
This Micro Tutorial will demonstrate how to use longer labels with horizontal bar charts instead of the vertical column chart.

895 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now