Help controling cell selection navigation with macros!


Posted by Frank H. on March 10, 2001 8:25 AM

I use a lot of control buttions to take the user to another area of the worksheet or to another tab in the workbook to input information. In all instances, I want to have the screen display the new area specifically and place the active cell as directed.

However, I cannot seem to get it correct in the macro.
I have "recorded" macros that still do not work correctly when executed.

Example: Sheets("Projected Hours Profile").Select
ActiveWindow.LargeScroll Down = 1
Range("A17").Select
Range("C28").Select

This is an attempt to have A17 as the top left cell visible on the screen and the cursor placed on C28 for data entry.

My results are A1 at the top left & the cursor on C28.

I frequently have this problem and have not been able to find a solution.

What am I doing wrong?

Thank you.

Posted by Dave Hawley on March 10, 2001 3:13 PM

Hi Frank

You would use the GoTo method for this, but you must set the Scroll argument to True to place it in the top left of screen


Sub GoThere()
With Sheets("Projected Hours Profile")
Application.Goto Reference:=.Range("A17"), Scroll:=True
End With
End Sub


Dave

OzGrid Business Applications



Posted by Ivan Moala on March 12, 2001 5:30 AM

Dave

Further to Daves suggestion...
....then activate or select the Cell for your data
entry which is C28........
eg
Sub GoThere()
With Sheets("Projected Hours Profile")
Application.Goto Reference:=.Range("A17"), Scroll:=True
.range("C28").select
End With
End Sub

Ivan