Solved

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

Posted on 2011-03-18
1
192 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

Is Your AD Toolbox Looking More Like a Toybox?

Managing Active Directory can get complicated.  Often, the native tools for managing AD are just not up to the task.  The largest Active Directory installations in the world have relied on one tool to manage their day-to-day administration tasks: Hyena. Start your trial today.

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,…
Introduction While answering a recent question (http:/Q_27311462.html), I created an alternative function to the Excel Concatenate() function that you might find useful.  I tested several solutions and share the results in this article as well as t…
This Micro Tutorial demonstrates how to create Excel charts: column, area, line, bar, and scatter charts. Formatting tips are provided as well.
This Micro Tutorial will demonstrate on a Mac how to change the sort order for chart legend values and decrpyt the intimidating chart menu.

777 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