Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default keep last row added visible on the screen

I add rows to a sheet by a macro.
I want to keep the last row added visible on the screen , no matter what is
the size of the window is.

Thanks

AR
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,494
Default keep last row added visible on the screen

don't know what your code looks like, but maybe you can adapt this to do what
you want:

Sub test()
Dim ws As Worksheet
Dim lastrow As Long
Set ws = Worksheets("sheet1")
lastrow = ws.Cells(Rows.Count, "A").End(xlUp).Row

Application.Goto ws.Range("A" & lastrow - 20), scroll:=True
End Sub

--


Gary


"BilBull" wrote in message
...
I add rows to a sheet by a macro.
I want to keep the last row added visible on the screen , no matter what is
the size of the window is.

Thanks

AR



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,355
Default keep last row added visible on the screen

Try putting a select for the last row added.
--
HTH,
Barb Reinhardt




"BilBull" wrote:

I add rows to a sheet by a macro.
I want to keep the last row added visible on the screen , no matter what is
the size of the window is.

Thanks

AR

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default keep last row added visible on the screen



"Gary Keramidas" wrote:

don't know what your code looks like, but maybe you can adapt this to do what
you want:

Sub test()
Dim ws As Worksheet
Dim lastrow As Long
Set ws = Worksheets("sheet1")
lastrow = ws.Cells(Rows.Count, "A").End(xlUp).Row

Application.Goto ws.Range("A" & lastrow - 20), scroll:=True
End Sub

--


Gary


"BilBull" wrote in message
...
I add rows to a sheet by a macro.
I want to keep the last row added visible on the screen , no matter what is
the size of the window is.

Thanks

AR




Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Problems with Visible and Screen Dave Excel Discussion (Misc queries) 0 January 4th 08 02:32 PM
Visible Screen AussieDave Excel Programming 8 September 18th 06 02:42 AM
Items Added to Right-Click Menu Only Visible From Some Sheets Carroll[_2_] Excel Programming 12 August 18th 05 04:18 PM
Items Added to Right-Click Menu Only Visible From Some Sheets Carroll[_2_] Excel Programming 0 August 18th 05 02:02 PM
color not visible on screen TJTOMCIU Setting up and Configuration of Excel 1 January 2nd 05 05:59 PM


All times are GMT +1. The time now is 03:37 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"