Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

Moving to another worksheet, specific locaton and scroll

Posted on 2014-01-23
4
184 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

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Approximate matching with VLOOKUP and MATCH seems to me to be a greatly under-used technique, and one which is vital for getting good performance out of large lookups. Until recently I would always have advised using an exact match for simplicity an…
Improved? Move/Copy Add-in Replacement - How to avoid the annoying, “A formula or sheet you want to move or copy contains the name XXX, which already exists on the destination worksheet.” David Miller (dlmille)  It was one of those days… I wa…
This Micro Tutorial will demonstrate on a Mac how to change the sort order for chart legend values and decrpyt the intimidating chart menu.
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

809 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