Map said:
Not really a development question, but I was writing a macro that does a
bunch of sorting, and I was wondering if there is a setting or a way to
prevent Excel from jumping to the top of the sheet every time I do a
sort? It's rather annoying.
Not that I know of, but you could just move the view back to where it was:
vrow = ActiveWindow.VisibleRange.Row
vcol = ActiveWindow.VisibleRange.Column
'your sorting code here, then...
rowdif = vrow - ActiveWindow.VisibleRange.Row
coldif = vcol - ActiveWindow.VisibleRange.Column
ActiveWindow.SmallScroll Down:=rowdif, ToRight:=coldif