Solved

Moving to another worksheet, specific locaton and scroll

Posted on 2014-01-23
4
178 Views
Last Modified: 2014-01-23
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.
0
Comment
Question by:Frank Freese
  • 2
4 Comments
 
LVL 18

Assisted Solution

by:Steven Harris
Steven Harris earned 150 total points
ID: 39805313
Private Sub cmdNumericValues_Click()
Application.Screenupdating = False
Worksheets("Text").Activate
Range("A47").Select
ActiveWindow.ScrollRow = Range("A47").Row
Application.Screenupdating = True
End Sub

Open in new window

0
 
LVL 33

Accepted Solution

by:
Norie earned 350 total points
ID: 39805320
Try this.
Application.Goto Sheets("Text").Range("A47"), True

Open in new window

0
 

Author Comment

by:Frank Freese
ID: 39805377
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.
0
 

Author Closing Comment

by:Frank Freese
ID: 39805379
Thanks to the both of you. Trying to be fair.
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Introduction While answering a recent question (http:/Q_27311462.html), I created an alternative function to the Excel Concatenate() function that you might find useful.  I tested several solutions and share the results in this article as well as t…
This article descibes how to create a connection between Excel and SAP and how to move data from Excel to SAP or the other way around.
The viewer will learn how to use the =DISCRINV command to create a discrete random variable, use this command to model a set of probabilities and outcomes in a Monte Carlo simulation, and learn how to find the standard deviation of a set of probabil…
This Micro Tutorial demonstrate the bugs in Microsoft Excel for Mac with Pivot Charts.

919 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now