SOLVED

Macros and VBA

Copper Contributor

I'm trying to move a specified row to the top of the screen. This seems to be easy enough but when I "select" a cell that I want to be on top, it appears somewhere else. Even when I just page down (several times) and page up, the screen changes so what was the top most row is no longer the one on top.  I could use "Freeze Frames" but then I would have to add this many times to my macros. I was hoping there is an easier way to do this.

Thanks,

Frank

2 Replies
best response confirmed by Frank Drucker (Copper Contributor)
Solution

@Frank Drucker 

You can use Application.GoTo with True as second argument. For example, to scroll cell A20 on the active sheet to the top:

Application.Goto Range("A20"), True

It even works with a cell on another sheet. That sheet will be activated. To scroll cell A20 on Sheet2 to the top:

Application.Goto Worksheets("Sheet2").Range("A20"), True

@Hans Vogelaar 

That worked. 

 

Thanks for your help.

Frank

1 best response

Accepted Solutions
best response confirmed by Frank Drucker (Copper Contributor)
Solution

@Frank Drucker 

You can use Application.GoTo with True as second argument. For example, to scroll cell A20 on the active sheet to the top:

Application.Goto Range("A20"), True

It even works with a cell on another sheet. That sheet will be activated. To scroll cell A20 on Sheet2 to the top:

Application.Goto Worksheets("Sheet2").Range("A20"), True

View solution in original post