View active cell in Top Left position

mutrus

Board Regular
Joined
Sep 10, 2002
Messages
80
How can I make the active cell appear in the top left position (using code)

That is when say Cell Z10 is selected the screen display changes so that Z10 is displayed at the top left cell position on the screen
 

Excel Facts

Difference between two dates
Secret function! Use =DATEDIF(A2,B2,"Y")&" years"&=DATEDIF(A2,B2,"YM")&" months"&=DATEDIF(A2,B2,"MD")&" days"
Hi Mutrus,
On 2002-09-18 01:58, mutrus wrote:
How can I make the active cell appear in the top left position (using code)

That is when say Cell Z10 is selected the screen display changes so that Z10 is displayed at the top left cell position on the screen

Try this:
Sub cellAtTop()
ActiveWindow.ScrollColumn = ActiveCell.Column
ActiveWindow.ScrollRow = ActiveCell.Row
End Sub
This message was edited by rikrak on 2002-09-18 02:06
 
Upvote 0
On 2002-09-18 03:43, Ivan F Moala wrote:
Or just
<pre/>
Sub GoTop()
Application.Goto ActiveCell, True
End Sub
</pre>

I'm learning every day!
Thanks Ivan fore the correction.
 
Upvote 0
On 2002-09-18 03:57, rikrak wrote:
On 2002-09-18 03:43, Ivan F Moala wrote:
Or just
<pre/>
Sub GoTop()
Application.Goto ActiveCell, True
End Sub
</pre>

I'm learning every day!
Thanks Ivan fore the correction.

Hello rikrak
We all learn every day :)
It wasn't a correction, just another way to do the same...keep up the good work
 
Upvote 0

Forum statistics

Threads
1,203,116
Messages
6,053,603
Members
444,673
Latest member
DWriter9

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