Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Call an Excel Macro when a Sheet is selected
Right click on the Sheet Tab. Select 'View Code'. Place this in the
module. Private Sub Worksheet_Activate() Call MyExcelMacro End Sub Each time that the worksheet is activated, your MyExcelMacro will run. Here are some links that have good info on events. You are using the Worksheet_Activate Event. http://www.mvps.org/dmcritchie/excel/event.htm http://www.cpearson.com/excel/events.htm http://support.microsoft.com/default...20&Product=xlw http://support.microsoft.com/default...b;EN-US;291294 http://support.microsoft.com/default...b;EN-US;161761 HTH Paul -------------------------------------------------------------------------------------------------------------- Be advised to back up your WorkBook before attempting to make changes. -------------------------------------------------------------------------------------------------------------- Hi, I was wondering if someone could help me with some simple code to Call an Excel Macro I have when a Sheet (tab) is first selected. Thanks, Grant |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Write macro to lock selected sheet when run | Excel Discussion (Misc queries) | |||
Call an Access macro from an Excel macro | Excel Discussion (Misc queries) | |||
Referring to the previous selected sheet in a macro | Excel Discussion (Misc queries) | |||
macro to extract data of a selected sheet | Excel Discussion (Misc queries) | |||
Can I use a variable to call up another sheet in Excel? | Excel Worksheet Functions |