Is row visible?

C

Charlotte E.

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
 
P

Paga Mike

'Charlotte E.[_3_ said:
;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 save

with the cursor placed in cell A1.

Is there a way to test if a row is visible, within the shown scree
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 Su
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top