Is This Content Helpful?
We're glad to know this article was helpful.
Is there an event triggered when the user changes or selects a layer in ArcMap's TOC?
No. There is currently no outbound interface that supports this event.
As a workaround, use a Timer Control to call IMxDocument::SelectedLayer on the MxDocument CoClass. Alternatively, call IMxDocument::SelectedLayer from the Enabled property of an ICommand.
ICommand::Enabled gets hit often and can be used, with caution, for code that must run frequently.