set view to top of worksheet

Noz2k

Well-known Member
Joined
Mar 15, 2011
Messages
693
Is there a way to set the screen view to the top of a worksheet?

I have a few buttons which all open the same sheet, however the visibilities are different. So in some instances there will be no data beyond row 50, but the sheet will open and be at cell 500 as that's where was scrolled down to previously.
 

Excel Facts

How to calculate loan payments in Excel?
Use the PMT function: =PMT(5%/12,60,-25000) is for a $25,000 loan, 5% annual interest, 60 month loan.
If I understand you correctly, you could use the line
Code:
Range("A1").activate
at the end of each button code.
 
Upvote 0
I thought that, but it didn't seem to do the trick when I tried.

I also attempted Range("A1").Select, but whilst it selected the cell it didn't move the screen up
 
Upvote 0
Are you saying when you run the code with Range("A1").activate it doesn't go to Range A1 ??
If it doesn't where does it go ?
If it goes somewhere else, you may have to post the code !!
Works fine for me !
 
Upvote 0
It just remained where it was.

But you're right it did work. The problem was that when I tried it, I didn't have it right at the bottom of all my code, and it was before I had re-enabled screen updating.

Also for the record VoG, your way worked for me to.

Thank you both for helping
 
Last edited:
Upvote 0
Glad it worked....I was starting to think the Excel gremlins were out tonight !!
 
Upvote 0

Forum statistics

Threads
1,224,585
Messages
6,179,706
Members
452,939
Latest member
WCrawford

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top