snap to selection in vb


Posted by Jeramy on December 18, 2001 3:55 PM

Hi

Is there a way to stap to a selection in VB. For example I have a large sheet and there are different buttons set up I would like to be able to click the button and go right to an area.
something like

sub test()

range("z:50").select

end sub


This will select the cell but it will be centered on the screen. what I would like is for the range to start in the top let corner of the screen.

Can anyone help

Thanks

Posted by Russell Hauf on December 18, 2001 4:48 PM

Try this:

Application.Goto Range("Z50"), True

Hope this helps,

Russell

Posted by Menenius on December 18, 2001 4:53 PM

sub test()

range("z50").select
Application.Goto Reference:=Selection, Scroll:=True

end sub




Posted by jeramy on December 18, 2001 5:53 PM

Thanks to both of you it works great. (NT)

Application.Goto Range("Z50"), True Hope this helps, Russell : Hi : Is there a way to stap to a selection in VB. For example I have a large sheet and there are different buttons set up I would like to be able to click the button and go right to an area.