Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Run macro problem
I want to call a macro from the Worksheet Deactivate
event, my problem is that I want the macro to carry out calculations on the active sheet. Is there any way to include anything in the Deactivate event that will switch back to the previously active sheet and run the macro. For example: Sheet1 is active and I click on Sheet2 which contains a summary of data on Sheet1, the macro needs to run so that the data on Sheet2 is updated (macro cannot be run from the activate event of sheet2). Thanks in advance. Gareth |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Run macro problem
Something like this?
Private Sub Worksheet_Deactivate() With ActiveSheet .Range("J11").Value = Application.Sum(.Range("A1:J10")) End With End Sub In article , "Gareth" wrote: I want to call a macro from the Worksheet Deactivate event, my problem is that I want the macro to carry out calculations on the active sheet. Is there any way to include anything in the Deactivate event that will switch back to the previously active sheet and run the macro. For example: Sheet1 is active and I click on Sheet2 which contains a summary of data on Sheet1, the macro needs to run so that the data on Sheet2 is updated (macro cannot be run from the activate event of sheet2). Thanks in advance. Gareth |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
I tried to get around the problem of the pivot table field settingdefaulting to Count instead of Sum by running a macro of change the settingfrom Count to Sum. However, when I tried to run the Macro, I got error messageof run time error 1004, unable | Excel Worksheet Functions | |||
I tried to get around the problem of the pivot table field settingdefaulting to Count instead of Sum by running a macro of change the settingfrom Count to Sum. However, when I tried to run the Macro, I got error messageof run time error 1004, unable | Excel Discussion (Misc queries) | |||
Macro problem | New Users to Excel | |||
Problem with a macro | Excel Programming | |||
My Macro problem | Excel Programming |