Link to home
Start Free TrialLog in
Avatar of Frank Freese
Frank FreeseFlag for United States of America

asked on

Moving to another worksheet, specific locaton and scroll

Folks,
In one worksheet I have a command button that takes me to another worksheet. Here's that code:

Private Sub cmdNumericValues_Click()
Worksheets("Text").Activate
End Sub

Open in new window


Once I get to the other worksheet I have another command button that takes me to a specific location. Here's that code:

Private Sub cmdNumberFormat_Click()
Range("A47").Select
ActiveWindow.ScrollRow = Range("A47").Row

End Sub

Open in new window


These codes work. What I would like to do is combine these to the first command button that eliminates the second command button.
SOLUTION
Avatar of Steven Harris
Steven Harris
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
ASKER CERTIFIED SOLUTION
Avatar of Norie
Norie

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Frank Freese

ASKER

ThinkSpaceSolutions:
I took this from you:
Worksheets("Text").Activate
Range("A47").Select

It failed looking for an object. I then did this

Worksheets("Text").Activate
Worksheets("Text").Range("A47").Select

leaving the rest of you before and after code as presented and it then worked.

Imnorie - yours worked as presented.

I'd like to share some of the points and thanks to the both of you.
Thanks to the both of you. Trying to be fair.