ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   ScrollRow (https://www.excelbanter.com/excel-programming/317097-scrollrow.html)

Glen Mettler[_4_]

ScrollRow
 

Situation: The user selects a row. From a menu option the user calculates
values in the row. The code sets a filter and then executes the
calculation. After the calculation this code runs:
Selection.AutoFilter
Range(ThisCell).Select ' go back to the selected row & col
ActiveWindow.Panes(1).ScrollRow = Row - 5
Application.ScreenUpdating = True
Application.EnableEvents = True

Problem. Although I can bring the selected row back into view with
ScrollRow, it is in a different position from before the calculation. This
is a distraction. Is there a way I can present the user with the exact view
after calculation as before - for example, suppose the user is on row 100
and row 100 is halfway down the pane (say 15 rows from the top). With my
current code, row 100 would show 5 rows from the top after the calculation.
I would like it to show in exactly the same place as before the
calculation - halfway down the page - or at row 15 from the top.

Is there a way to do that?

Glen




All times are GMT +1. The time now is 12:00 AM.

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