View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Nigel Nigel is offline
external usenet poster
 
Posts: 923
Default Worksheet Deactivation Event

Place the following code in the worksheet code area


Private Sub Worksheet_Deactivate()
Call MyMacro
End Sub

--
Cheers
Nigel



"DynamiteSkippy" wrote in message
...
I am trying to enable a macro to run when a particular worksheet is
deselected.

Thus far I have followed the directions on this web page:


http://exceltips.vitalnews.com/Pages...tiva ted.html

However I am recieving an error:

Cannot Find FileName!MacroName.

I am asking for either help with this method to correct the error or if
anyone knows a different method--I don't mind doing it in VBA, I just

don't
know how yet.