Saving and returning to saved screen view? (Pan L/R U/D)
Try this. The first part stores the current cursor location (active cell),
your macro runs, then the last part takes you back to the stored location.
Is this what you need?
Dim cLoc As String
cLoc = ActiveCell.Address
'Your macro here that moves / scrolls the sheet to some other place
Application.Goto Reference:=Range(cLoc)
Cheers
Nigel
"Wandering Mage" wrote in message
...
OK. So here's what I have. I click a cell, and a
selection change macro turns the cell value to "X" or ""
(toggles). Then it returns me to like range "B3", or
somewhere close to that. The problem is, part of where
this "X"ing macro is, may be far off to the right, and I
want the user to still be looking at where he clicked,
once the new value has been set to "X" or "", but I still
want the cell "B3" to be selected. Is there anyway to
save where the screen is panned over/up to before the
macro and then return it to that same view after? Help is
appreciated, as always! Thank you.
|