Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Worksheet Switch event?

Posted on 2012-04-13
5
Medium Priority
?
265 Views
Last Modified: 2012-04-13
Hi,

I know there is a worksheet change event. Is there an event to run when a worksheet is change (say when a user clicks from tab A to tab B?)

In my senario, user would enter data on A and then switch to B to see calculated data (using some VBA)

How would I go on to do this?

Is it possible to do this via worksheet change event?

Thanks!
0
Comment
Question by:Shanan212
[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
5 Comments
 
LVL 43

Accepted Solution

by:
Saqib Husain, Syed earned 1600 total points
ID: 37844243
Private Sub Worksheet_Activate()
0
 
LVL 10

Assisted Solution

by:Anthony Berenguel
Anthony Berenguel earned 200 total points
ID: 37844252
within the workbook
Private Sub Workbook_SheetChange(ByVal Sh As Object, ByVal Target As Range)
'your code
End Sub

Open in new window

0
 
LVL 43

Assisted Solution

by:Saqib Husain, Syed
Saqib Husain, Syed earned 1600 total points
ID: 37844263
Private Sub Workbook_SheetActivate(ByVal Sh As Object)
0
 
LVL 34

Assisted Solution

by:Norie
Norie earned 200 total points
ID: 37844479
Each worksheet had a Deactivate and Activate event.

A workbook has the SheetActivate and SheetDeactivate event.

I suppose you could use those, or you could add to the existing code to activate Sheet B when Sheet A is changed.

To goto another  worksheet you can use this.
Application.Goto Sheets("SheetB").Range("A1")

Open in new window

This will goto A1 but you coould change the range to goto where the results will be found.
0
 
LVL 13

Author Closing Comment

by:Shanan212
ID: 37844564
Thanks all!
0

Featured Post

New benefit for Premium Members - Upgrade now!

Ready to get started with anonymous questions today? It's easy! Learn more.

Question has a verified solution.

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

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.
After seeing numerous questions for Dynamic Data Validation I notice that most have used Visual Basic to solve the problem. This suggestion is purely formula based and can be used in multiple rows.
This Micro Tutorial will demonstrate how to use a scrolling table in Microsoft Excel using the INDEX function.
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…

722 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