Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Excel / Programming / April 2008

Tip: Looking for answers? Try searching our database.

Where am I ?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Gary''s Student - 28 Apr 2008 20:36 GMT
Given that the user has arbitrarily scrolled up and down and right and left,
what is the address of the top, leftmost cell ?  That is, the first visible
cell in the Excel window ?
Signature

Gary''s Student - gsnu2007xx

Peter T - 28 Apr 2008 20:43 GMT
MsgBox ActiveWindow.VisibleRange(1, 1).Address

Regards,
Peter T

> Given that the user has arbitrarily scrolled up and down and right and left,
> what is the address of the top, leftmost cell ?  That is, the first visible
> cell in the Excel window ?
Gary''s Student - 28 Apr 2008 21:03 GMT
Thanks
Signature

Gary''s Student - gsnu200781

> MsgBox ActiveWindow.VisibleRange(1, 1).Address
>
[quoted text clipped - 6 lines]
> visible
> > cell in the Excel window ?
Jim Thomlinson - 28 Apr 2008 20:44 GMT
MsgBox ActiveWindow.ActivePane.VisibleRange.Cells(1, 1).Address
Signature

HTH...

Jim Thomlinson

> Given that the user has arbitrarily scrolled up and down and right and left,
> what is the address of the top, leftmost cell ?  That is, the first visible
> cell in the Excel window ?
Gary''s Student - 28 Apr 2008 21:03 GMT
Thanks
Signature

Gary''s Student - gsnu200781

> MsgBox ActiveWindow.ActivePane.VisibleRange.Cells(1, 1).Address
>
> > Given that the user has arbitrarily scrolled up and down and right and left,
> > what is the address of the top, leftmost cell ?  That is, the first visible
> > cell in the Excel window ?
Rick Rothstein (MVP - VB) - 28 Apr 2008 20:47 GMT
I think this is what you want...

TopRow = ActiveWindow.Panes(ActiveWindow.Panes.Count).ScrollRow
LeftCol = ActiveWindow.Panes(ActiveWindow.Panes.Count).ScrollColumn

While you can get any pane's scrolled row/column, I assumed that, if there
were one or more split panes, you would want the right, bottom or
right-bottom most one (hence the reference to the Count property).

Rick

> Given that the user has arbitrarily scrolled up and down and right and
> left,
> what is the address of the top, leftmost cell ?  That is, the first
> visible
> cell in the Excel window ?
Rick Rothstein (MVP - VB) - 28 Apr 2008 21:02 GMT
I guess, in light of the other posts, if you wanted the address of the
top/left cell in the bottom, right or bottom-right most pane (when there is
one or more panes showing), you could use this...

TopLeftCellAddress = Split(ActiveWindow.Panes(ActiveWindow.Panes.Count)._
                                         VisibleRange.Address, ":")(0)

Rick

>I think this is what you want...
>
[quoted text clipped - 12 lines]
>> visible
>> cell in the Excel window ?
Gary''s Student - 28 Apr 2008 21:04 GMT
Thanks again
Signature

Gary''s Student - gsnu200781

> I think this is what you want...
>
[quoted text clipped - 12 lines]
> > visible
> > cell in the Excel window ?
Gary Keramidas - 28 Apr 2008 20:50 GMT
another way i always use:

activewindow.VisibleRange.Range("A1").address
Signature


Gary

> Given that the user has arbitrarily scrolled up and down and right and left,
> what is the address of the top, leftmost cell ?  That is, the first visible
> cell in the Excel window ?
Gary''s Student - 28 Apr 2008 21:04 GMT
Thanks
Signature

Gary''s Student - gsnu200781

> another way i always use:
>
> activewindow.VisibleRange.Range("A1").address
> > Given that the user has arbitrarily scrolled up and down and right and left,
> > what is the address of the top, leftmost cell ?  That is, the first visible
> > cell in the Excel window ?
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.