How to put the selected cell onscreen, but not upper left

D

davegb

I want to put the currently selected cell onscreen but not at the top
left. I want a cell in Col E selected, but I want the user to see cols
A-E. I can manipulate XL to select A9, then scroll there, then select
E9, but it seems there must be a better, more direct way. Right now I
have:

Application.Goto Reference:=ActiveCell, Scroll:=True

which puts the selected cell (E9) in the upper left of the display.

Thanks for the help.
 
G

Gary''s Student

Try this:

Sub marine()
Range("E9").Select
Application.Goto Reference:=ActiveCell, Scroll:=True
ActiveWindow.ScrollColumn = 1
End Sub
 
D

davegb

Try this:

Sub marine()
Range("E9").Select
Application.Goto Reference:=ActiveCell, Scroll:=True
ActiveWindow.ScrollColumn = 1
End Sub

--
Gary''s Student - gsnu2007e








- Show quoted text -

Bingo! Thanks for the prompt reply.
 
R

Ron de Bruin

If I understand you correct ?

Sub test()
Application.Goto Reference:=Cells(ActiveCell.Row, 1), Scroll:=True
Cells(ActiveCell.Row, 5).Select
End Sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top