Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Moving to another worksheet, specific locaton and scroll

Posted on 2014-01-23
4
Medium Priority
?
189 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
[X]
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
  • 2
4 Comments
 
LVL 18

Assisted Solution

by:Steven Harris
Steven Harris earned 600 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 35

Accepted Solution

by:
Norie earned 1400 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

[Webinar] Lessons on Recovering from Petya

Skyport is working hard to help customers recover from recent attacks, like the Petya worm. This work has brought to light some important lessons. New malware attacks like this can take down your entire environment. Learn from others mistakes on how to prevent Petya like worms.

Question has a verified solution.

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

Introduction This Article briefly covers methods of calculating the NPV and IRR variants in Excel as well as the limitations in calculating and interpreting IRR results. Paraphrasing Richard Shockley, author of my favourite finance reference tex…
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.
This Micro Tutorial will demonstrate how to use a scrolling table in Microsoft Excel using the INDEX function.
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…

609 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