Q:

Display selection at upper left corner of spreadsheet

hi is it possible to do this kind of things in excel-2007 vb...
for example user selects cell or range....
let's say cell G13, now this cell will be displayed on the upper-left corner of the sheet (i.e. where usually A1 resides by default)
in the case of range selection the upper-left corner of the range will be displayed in upper-left corner of the worksheet...
thanks a lot in advance!

A:

Here is how you get the spreadsheet to roll to the cell you want:
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
    Application.EnableEvents = False            
        ActiveWindow.ScrollColumn = Target.Column
        ActiveWindow.ScrollRow = Target.Row
    Application.EnableEvents = True
End Sub

I think you will find that this will drive the users crazy, but you can probably modify it to get a friendlier effect.

