ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   How to make the last rows visible? (https://www.excelbanter.com/excel-programming/427282-how-make-last-rows-visible.html)

fred

How to make the last rows visible?
 
Hello,
I am using Excel automation and vbasic 5 programming to add data to the
opened sheet, however after reaching the sheet's window full of data the
next rows of data are below the screen.
How to display the current row and preferrably a few empty rows after that
in real time?
Please advise,
Fred



JLGWhiz

How to make the last rows visible?
 
This will scroll down five rows on the active sheet.

Sub fj()
ActiveWindow.SmallScroll Down:=5
End Sub

You should be able to manually scroll. However, if you need to use code the
above scrolls by line. Use the same syntax with LargeScroll to scroll by
page. Direction options are Up:=, Down:=, Right:= and Left:=

"fred" wrote:

Hello,
I am using Excel automation and vbasic 5 programming to add data to the
opened sheet, however after reaching the sheet's window full of data the
next rows of data are below the screen.
How to display the current row and preferrably a few empty rows after that
in real time?
Please advise,
Fred




Rick Rothstein

How to make the last rows visible?
 
You can set the row number of the top visible row for the active sheet using
this...

ActiveWindow.Panes(ActiveWindow.Panes.Count).Scrol lRow = RowNumber

where RowNumber is the number of the row that you want displayed at the top
of the active worksheet. If you want to show some of the filled rows above
that row, you can subtract that number for RowNumber (but you will need to
protect against the value going negative. Something like this...

If RowNumber 15 Then
ActiveWindow.Panes(ActiveWindow.Panes.Count).Scrol lRow = RowNumber - 15
End If

--
Rick (MVP - Excel)


"fred" wrote in message
...
Hello,
I am using Excel automation and vbasic 5 programming to add data to the
opened sheet, however after reaching the sheet's window full of data the
next rows of data are below the screen.
How to display the current row and preferrably a few empty rows after that
in real time?
Please advise,
Fred



fred

How to make the last rows visible?
 
Thank you. That is a good start.
But, how to detect that the row is already off screen?
I do not want to do scroll anything until the page is filled.
Thanks,
Fred

"JLGWhiz" wrote in message
...
This will scroll down five rows on the active sheet.

Sub fj()
ActiveWindow.SmallScroll Down:=5
End Sub

You should be able to manually scroll. However, if you need to use code
the
above scrolls by line. Use the same syntax with LargeScroll to scroll by
page. Direction options are Up:=, Down:=, Right:= and Left:=

"fred" wrote:

Hello,
I am using Excel automation and vbasic 5 programming to add data to the
opened sheet, however after reaching the sheet's window full of data the
next rows of data are below the screen.
How to display the current row and preferrably a few empty rows after
that
in real time?
Please advise,
Fred






fred

How to make the last rows visible?
 
Thank you, Rick.
That's exactly is what I was looking for.
Fred

"Rick Rothstein" wrote in message
...
You can set the row number of the top visible row for the active sheet
using this...

ActiveWindow.Panes(ActiveWindow.Panes.Count).Scrol lRow = RowNumber

where RowNumber is the number of the row that you want displayed at the
top of the active worksheet. If you want to show some of the filled rows
above that row, you can subtract that number for RowNumber (but you will
need to protect against the value going negative. Something like this...

If RowNumber 15 Then
ActiveWindow.Panes(ActiveWindow.Panes.Count).Scrol lRow = RowNumber - 15
End If

--
Rick (MVP - Excel)


"fred" wrote in message
...
Hello,
I am using Excel automation and vbasic 5 programming to add data to the
opened sheet, however after reaching the sheet's window full of data the
next rows of data are below the screen.
How to display the current row and preferrably a few empty rows after
that in real time?
Please advise,
Fred






All times are GMT +1. The time now is 10:24 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com