ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Is row visible? (https://www.excelbanter.com/excel-programming/449135-row-visible.html)

Charlotte E.[_3_]

Is row visible?
 
Hi all,


When I open a spreadsheet row #900 is (usually) not visible, since I
simple don't have a monitor with such a high resolution :-)

But row #1 is usualy visible, since the spreadsheet normally gets saved
with the cursor placed in cell A1.

Is there a way to test if a row is visible, within the shown screen area?

Not if the row itself is hidden, with 'hide row', but visible due to
screen resolution and placing of the cursor?


TIA,

CE

Claus Busch

Is row visible?
 
Hi Charlotte,

Am Sat, 10 Aug 2013 10:32:47 +0200 schrieb Charlotte E.:

Is there a way to test if a row is visible, within the shown screen area?


ActiveWindow.ScrollRow is the top row in the screen area


Regards
Claus B.
--
Win XP PRof SP2 / Vista Ultimate SP2
Office 2003 SP2 /2007 Ultimate SP2

Paga Mike

Quote:

Originally Posted by Charlotte E.[_3_] (Post 1613282)
Hi all,


When I open a spreadsheet row #900 is (usually) not visible, since I
simple don't have a monitor with such a high resolution :-)

But row #1 is usualy visible, since the spreadsheet normally gets saved
with the cursor placed in cell A1.

Is there a way to test if a row is visible, within the shown screen area?

Not if the row itself is hidden, with 'hide row', but visible due to
screen resolution and placing of the cursor?


TIA,

CE

Hi CE:

Give this a try:

Sub IsRowOnScreen()
Dim N As Long, s As String
N = Application.InputBox(Prompt:="Enter row number", Type:=1)
s = N & ":" & N
If Intersect(Rows(s), ActiveWindow.VisibleRange) Is Nothing Then
MsgBox "row not in visible window"
Else
MsgBox "row in visible window"
End If
End Sub

Charlotte E.[_3_]

Is row visible?
 
Thanks guys :-)


CE



Den 10.08.2013 10:32, Charlotte E. skrev:
Hi all,


When I open a spreadsheet row #900 is (usually) not visible, since I
simple don't have a monitor with such a high resolution :-)

But row #1 is usualy visible, since the spreadsheet normally gets saved
with the cursor placed in cell A1.

Is there a way to test if a row is visible, within the shown screen area?

Not if the row itself is hidden, with 'hide row', but visible due to
screen resolution and placing of the cursor?


TIA,

CE



All times are GMT +1. The time now is 07:27 PM.

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