ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Set A1 on Top left Corner Q (https://www.excelbanter.com/excel-programming/387722-set-a1-top-left-corner-q.html)

Sean

Set A1 on Top left Corner Q
 
How can I ensure that A1 is in the top left corner of my screen and
then the cursor is in K6?

I've tried below but it doesn't work

Sheets("Sheet1").Activate
Range("A1").Select
Range("K6").Select

Thanks


Mike

Set A1 on Top left Corner Q
 
Your code will work if it;s in the correct place

Right click the sheet tab and then view code

paste this in

Private Sub Worksheet_Activate()

Range("A1").Select
Range("K6").Select

End Sub

Mike

"Sean" wrote:

How can I ensure that A1 is in the top left corner of my screen and
then the cursor is in K6?

I've tried below but it doesn't work

Sheets("Sheet1").Activate
Range("A1").Select
Range("K6").Select

Thanks



PMC1

Set A1 on Top left Corner Q
 
On Apr 19, 10:20 am, Sean wrote:
How can I ensure that A1 is in the top left corner of my screen and
then the cursor is in K6?

I've tried below but it doesn't work

Sheets("Sheet1").Activate
Range("A1").Select
Range("K6").Select

Thanks


Provided you don't have and splitwindows on your sheet this will work

Cells(ActiveWindow.SplitRow + 1, ActiveWindow.SplitColumn +
1).Select 'This is the same as using CTRL+HOME
Range("K6").Select


hth

Paul



All times are GMT +1. The time now is 11:05 AM.

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