ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Moving Active Cell to Upper Left Hand Corner of Screen (https://www.excelbanter.com/excel-programming/386468-moving-active-cell-upper-left-hand-corner-screen.html)

RJB

Moving Active Cell to Upper Left Hand Corner of Screen
 
I want to run a macro that goes to a specific cell - say, GG217.

Here's my code:
Sub GotoGG217
Sheets("Sheet1").Select
Application.Goto Reference:="R217C189"
End Sub

This selects GG217, but sometimes it's on the lower-right hand corner of the
screen, sometimes the upper right, etc. I'd like it in the UPPER LEFT.

How to do? (And since it doesn't seem to be consistent, and different folks
will be running this with different-sized monitors, putting in
"ActiveWindow.SmallScroll" probably won't work...)

Jim Rech

Moving Active Cell to Upper Left Hand Corner of Screen
 
Application.Goto Reference:="R217C189", Scroll:=True

--
Jim
"RJB" wrote in message
...
|I want to run a macro that goes to a specific cell - say, GG217.
|
| Here's my code:
| Sub GotoGG217
| Sheets("Sheet1").Select
| Application.Goto Reference:="R217C189"
| End Sub
|
| This selects GG217, but sometimes it's on the lower-right hand corner of
the
| screen, sometimes the upper right, etc. I'd like it in the UPPER LEFT.
|
| How to do? (And since it doesn't seem to be consistent, and different
folks
| will be running this with different-sized monitors, putting in
| "ActiveWindow.SmallScroll" probably won't work...)



RJB

Moving Active Cell to Upper Left Hand Corner of Screen
 
Wow. Simple.

Thank you.

"Jim Rech" wrote:

Application.Goto Reference:="R217C189", Scroll:=True

--
Jim
"RJB" wrote in message
...
|I want to run a macro that goes to a specific cell - say, GG217.
|
| Here's my code:
| Sub GotoGG217
| Sheets("Sheet1").Select
| Application.Goto Reference:="R217C189"
| End Sub
|
| This selects GG217, but sometimes it's on the lower-right hand corner of
the
| screen, sometimes the upper right, etc. I'd like it in the UPPER LEFT.
|
| How to do? (And since it doesn't seem to be consistent, and different
folks
| will be running this with different-sized monitors, putting in
| "ActiveWindow.SmallScroll" probably won't work...)





All times are GMT +1. The time now is 07:37 AM.

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