View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Mike H Mike H is offline
external usenet poster
 
Posts: 11,501
Default Worksheet(s) open to last used row

Hi,

Alt + F11 to open VB editor. Doubleclick 'ThisWorkbook' and paste this in on
the right. Each time you select a sheet it will leave 4 rows of the ised
range at the top

Private Sub Workbook_SheetActivate(ByVal Sh As Object)
On Error Resume Next

LastRow = Cells.Find(What:="*", After:=[A1], _
SearchOrder:=xlByRows, _
SearchDirection:=xlPrevious).Row

With ActiveWindow
..ScrollRow = LastRow - 3
End With
End Sub


Mike

"PapaBear" wrote:

Greetings, I have a workbook with 50+ worksheets in it. Each day when I
launch my workbook I have to scroll down to the last few visible rows to be
able to enter in the new data for the day. Every time, 50 times... It's
getting a little tedious. Is there a way to code the worksheet/workbook so
that the worksheet opens up so that the last two or three filled rows are
visible at the top of the worksheet?

(I keep thinking, "If it default opens to the first row, surely there is a
way to get it to default open to the "x" row...")
Thanks,