Solved

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

Posted on 2011-03-18
1
193 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
1 Comment
 
LVL 33

Accepted Solution

by:
jppinto earned 500 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

Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

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

This tutorial explains how to create a series of drop-down lists that are dependent upon prior selections to guide (“force”) the user to make the correct selection and reduce data errors within Microsoft Excel. Excel 2010 was used for this tutorial;…
With User Account Control (UAC) enabled in Windows 7, one needs to open an elevated Command Prompt in order to run scripts under administrative privileges. Although the elevated Command Prompt accomplishes the task, the question How to run as script…
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 use longer labels with horizontal bar charts instead of the vertical column chart.

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