Moving to another worksheet, specific locaton and scroll

Posted on 2014-01-23
Last Modified: 2014-01-23
In one worksheet I have a command button that takes me to another worksheet. Here's that code:

Private Sub cmdNumericValues_Click()
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()
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.
Question by:Frank Freese
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
LVL 18

Assisted Solution

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

Open in new window

LVL 34

Accepted Solution

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

Open in new window


Author Comment

by:Frank Freese
ID: 39805377
I took this from you:

It failed looking for an object. I then did this


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.

Author Closing Comment

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

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

A little background as to how I came to I design this code: Around 5 years ago I designed an add-in that formatted Excel files to a corporate standard, applying different cell colours and font type depending on whether the cells contained inputs,…
Freeze panes is an option within all variants of Excel to enable parts of a sheet to remain stationary when the cursor is in another part of the sheet. This is a very useful feature which is overlooked or under used.
The viewer will learn how to use a discrete random variable to simulate the return on an investment over a period of years, create a Monte Carlo simulation using the discrete random variable, and create a graph to represent the possible returns over…
This Micro Tutorial demonstrates using Microsoft Excel pivot tables, how to reverse engineer competitors' marketing strategies through backlinks.

691 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