ExcelBanter

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

raj

Scroll selection into view
 
Hello, I hope someone will be able to help me, please.

In Excel XP, I have a program that when the user double
clicks a value in a "SUMMARY" sheet, the program takes the
user to the details in a "DETAIL" sheet.

The program uses "Find" to locate the appropriate data.
The "DETAIL" sheet is activated and it all works great,
except one thing.

The selection (always an entire row) is not visible (off
screen). I need a way to scroll the currently selected row
into view (preferably toward the center of the screen)
without losing my selection.

Your example code would be most appreciated. Thank you
very much in advance for your assistance on this.




Amit Shanker

Scroll selection into view
 
ActiveWindow.ScrollRow = 1 'Or your required row number here

Amit


"raj" wrote in message
...
Hello, I hope someone will be able to help me, please.

In Excel XP, I have a program that when the user double
clicks a value in a "SUMMARY" sheet, the program takes the
user to the details in a "DETAIL" sheet.

The program uses "Find" to locate the appropriate data.
The "DETAIL" sheet is activated and it all works great,
except one thing.

The selection (always an entire row) is not visible (off
screen). I need a way to scroll the currently selected row
into view (preferably toward the center of the screen)
without losing my selection.

Your example code would be most appreciated. Thank you
very much in advance for your assistance on this.






Don Guillett[_4_]

Scroll selection into view
 
try
Sub gothere()
Application.Goto Range("a21"), Scroll = True
End Sub

--
Don Guillett
SalesAid Software

"raj" wrote in message
...
Hello, I hope someone will be able to help me, please.

In Excel XP, I have a program that when the user double
clicks a value in a "SUMMARY" sheet, the program takes the
user to the details in a "DETAIL" sheet.

The program uses "Find" to locate the appropriate data.
The "DETAIL" sheet is activated and it all works great,
except one thing.

The selection (always an entire row) is not visible (off
screen). I need a way to scroll the currently selected row
into view (preferably toward the center of the screen)
without losing my selection.

Your example code would be most appreciated. Thank you
very much in advance for your assistance on this.






arno

Scroll selection into view
 

Hi,

I need a way to scroll the currently selected row
into view (preferably toward the center of the screen)
without losing my selection.


if you want to see cell(x, y):

ActiveWindow.ScrollColumn = y
ActiveWindow.ScrollRow = x

regards

arno




All times are GMT +1. The time now is 05:32 PM.

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