viewing the cell reference as the top row

B

bobclark

within a macro I want to have the cell I call be the top row for viewing,is
this possible?
 
K

Katie

yes, it is possible.

Use the ActiveWindow.ScrollRow command. For example, setting
ActiveWindow.ScrollRow = 10 moves row 10 to the top of the screen.

You just need to replace "10" with the row of the cell that you call, it can
be a variable, and it should work.

Katie
 
D

Dave Peterson

Maybe you could try this, dad.

Option Explicit
Sub testme()
Dim myCell As Range
With ActiveSheet
Set myCell = .Range("x33")
Application.Goto myCell, scroll:=True
End With
End Sub

What's for dinner?
 
B

bobclark

Well tonight it's chicken parmesan, saffron rice and a nice chardonnay (it's
wonderful living in wine country). Tomorrow we're having Roasted Rack of Lamb
with Garlic and red wine sauce, maybe a Caesar salad (from scratch, of course)
with asparagus fried in a butter, white wine and garlic sauce. Don't be late,
you know how the evil step-mom can be.

And Thanks, son

On Fri, 15 Oct 2004 15:12:12 -0500, in microsoft.public.excel.misc falling into
the bathtub with your monitor, the short circuit caused the following to
mysteriously appear from your keyboard:

~>Maybe you could try this, dad.
~>
~>Option Explicit
~>Sub testme()
~> Dim myCell As Range
~> With ActiveSheet
~> Set myCell = .Range("x33")
~> Application.Goto myCell, scroll:=True
~> End With
~>End Sub
~>
~>What's for dinner?
~>
~>
~>Bob, Clark wrote:
~>>
~>> I've tried several methods BUT
~>>
~>> how can I now move the cursor (active cell) to that row?
~>>
~>> On Wed, 13 Oct 2004 00:51:04 -0700, in microsoft.public.excel.misc falling
into
~>> the bathtub with your monitor, the short circuit caused the followingto
~>> mysteriously appear from your keyboard:
~>>
~>> ~>yes, it is possible.
~>> ~>
~>> ~>Use the ActiveWindow.ScrollRow command. For example, setting
~>> ~>ActiveWindow.ScrollRow = 10 moves row 10 to the top of the screen.
~>> ~>
~>> ~>You just need to replace "10" with the row of the cell that you call, it
can
~>> ~>be a variable, and it should work.
~>> ~>
~>> ~>Katie
~>> ~>
~>> ~>"Bob Clark" wrote:
~>> ~>
~>> ~>> within a macro I want to have the cell I call be the top row for
viewing, is
~>> ~>> this possible?
~>> ~>>
 
Top