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

x
?
Solved

Move to a different sheet based on cell "A3" of current sheet

Posted on 2011-03-18
1
Medium Priority
?
198 Views
Last Modified: 2012-05-11
I would like to change the following code so it works on every sheet in the workbook.  I know I can copy and paste it to each sheet, but I thought there might be a simpler way.

Thanks,
Joan
Private Sub Worksheet_Change(ByVal Target As Range)
On Error Resume Next
Application.EnableEvents = False
Application.ScreenUpdating = False

    If Target.Address = Range("A3").Address Then
        Application.GoTo Worksheets(Range("AC2").Value).Range("A3")
        
    End If
        
Application.EnableEvents = True
Application.ScreenUpdating = True

End Sub

Open in new window

0
Comment
Question by:jmkbrown
[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
1 Comment
 
LVL 33

Accepted Solution

by:
jppinto earned 2000 total points
ID: 35165686
You can try putting this code on the Workbook Sheet_Change event:

Private Sub Workbook_SheetChange(ByVal Sh As Object, ByVal Target As Range)

     ' your code here...

End Sub
0

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

You need to know the location of the Office templates folder, so that when you create new templates, they are saved to that location, and thus are available for selection when creating new documents.  The steps to find the Templates folder path are …
This article describes how you can use Custom Document Properties to store settings and other information in your workbook so that they will be available the next time you open the workbook.
Graphs within dashboards are meant to be dynamic, representing data from a period of time that will change each time the dashboard is updated with new data. Rather than update each graph to point to a different set within a static set of data, t…
This Micro Tutorial will demonstrate how to create pivot charts out of a data set. I also added a drop-down menu which allows to choose from different categories in the data set and the chart will automatically update.

598 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