Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 92
Default How to determine whether Cell is in current view?

Hello -

I would like to figure out if a certain cell is currently shown in the
current view. For instance, the excel window only displays rows 20-30
and the desired cell is in row 40 then I want to use a
ActiveWindow.ScrollRow = 40 command to make it visible.

I realize that I could just call .Select on the cell but I don't want
to move the current selection.

I found the ActiveWindow.VisibleRange function but how can I determine
from that information whether a certain cell is in the visible range?

Thanks!
Joe

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6,953
Default How to determine whether Cell is in current view?

if Intersect(ActiveWindow.VisibleRange,Range("A40")) is nothing then
'not in view
Activewindow.ScrollRow = 35
end if

--
Regards,
Tom Ogilvy


"Joe HM" wrote:

Hello -

I would like to figure out if a certain cell is currently shown in the
current view. For instance, the excel window only displays rows 20-30
and the desired cell is in row 40 then I want to use a
ActiveWindow.ScrollRow = 40 command to make it visible.

I realize that I could just call .Select on the cell but I don't want
to move the current selection.

I found the ActiveWindow.VisibleRange function but how can I determine
from that information whether a certain cell is in the visible range?

Thanks!
Joe


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 92
Default How to determine whether Cell is in current view?

Hello -

Thanks a lot for help! I guess I did not know there was an Intersect()
function ... but that will come in handy in other cases as well!

Joe

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
Function to determine current cursor position? Dan Excel Worksheet Functions 1 March 12th 09 02:56 PM
Determine the current cell while inside a User Defined Function pmax Excel Programming 2 February 1st 06 11:47 PM
How do i know the name of current view? OKLover[_2_] Excel Programming 1 September 7th 05 02:23 PM
Find cell and determine value in current row Kathy - Lovullo Excel Programming 1 December 28th 04 02:13 PM
Determine current default fill color Steve Conary Excel Programming 0 December 2nd 04 05:08 PM


All times are GMT +1. The time now is 05:30 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"