View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Otto Moehrbach[_2_] Otto Moehrbach[_2_] is offline
external usenet poster
 
Posts: 1,071
Default Need to return to display

Excel XP & Win XP
I wrote a large program for an OP in which, among other things, a specific
range is chosen, from many, to be displayed on the screen. I use the code:
With ActiveWindow
.ScrollRow = y
.ScrollColumn = x
End With
to position the specific range on the screen. The x and y values, of
course, are peculiar to the range chosen.
I now need to code a return to the last selected display. Note that the
display has changed since the user made his last selection as a result of
actions he took with the selected display. I can do this easily if I can
capture the cell address of the top left cell before he does things that
force a display change.
I realize that I can capture that cell address at the time the range
selection is made, but that would mean code changes to many pieces of code.
My question: Can I capture the cell or cell address of the top left cell on
the screen, and if so, how? Thanks for your time. Otto