ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Scroll Into View (https://www.excelbanter.com/excel-programming/291414-scroll-into-view.html)

Peter M[_3_]

Scroll Into View
 
I have a set of macro's that select a predefined cell. Although the cells
are correctly selected I wish to make the newly selected cell move to the
top left hand corner of the window. The ActiveWindow.ScrollIntoView command
seems ideal, I can use the top, left, width and height properties of the
range object to indicate what I want at the top left.

However it doesnt seem to work, the command executes without errror, but the
cell is often placed only half way up the screen? Is there a margin or some
other setting I have ignored?

Grateful for any advice.

Thanks,

Peter M



Tom Ogilvy

Scroll Into View
 
With Activewindow
.ScrollRow = ActiveCell.Row
.ScrollColumn = ActiveCell.Column
End With

--
Regards,
Tom Ogilvy


"Peter M" wrote in message
...
I have a set of macro's that select a predefined cell. Although the cells
are correctly selected I wish to make the newly selected cell move to the
top left hand corner of the window. The ActiveWindow.ScrollIntoView

command
seems ideal, I can use the top, left, width and height properties of the
range object to indicate what I want at the top left.

However it doesnt seem to work, the command executes without errror, but

the
cell is often placed only half way up the screen? Is there a margin or

some
other setting I have ignored?

Grateful for any advice.

Thanks,

Peter M






All times are GMT +1. The time now is 07:25 PM.

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