Solved

How do I get a macro to run everytime I enter a specific worksheet?

Posted on 2006-10-26
1
165 Views
Last Modified: 2010-04-30
Everytime I enter the "Summary" tab, I would like to run a macro that I already have set up.  Can anyone tell me how I can do this using VBA? Thanks!
0
Comment
Question by:tiehaze
1 Comment
 
LVL 92

Accepted Solution

by:
Patrick Matthews earned 500 total points
ID: 17813761
Hi tiehaze,

Put this into the sheet module for Summary:

Private Sub Worksheet_Activate()

    'insert code or call to another sub here

End Sub


Regards,

Patrick
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
VBA: Add rows to listbox based on criteria 7 79
JSON Response and request in VB6 application 11 252
How to debug this code 7 56
Set email body to html using vbscript 6 28
Background What I'm presenting in this article is the result of 2 conditions in my work area: We have a SQL Server production environment but no development or test environment; andWe have an MS Access front end using tables in SQL Server but we a…
This article describes some techniques which will make your VBA or Visual Basic Classic code easier to understand and maintain, whether by you, your replacement, or another Experts-Exchange expert.
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

867 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

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now