In my workbook I can only see the initialize, startup and shutdown events.
Is it possible to perform an action when the workbook gets the focus?
Printable View
In my workbook I can only see the initialize, startup and shutdown events.
Is it possible to perform an action when the workbook gets the focus?
I tried this in the sheet code behind and whilst the internal startup code is run the Activate_Event never gets called from startup or on receiving focus.
Code:private void InternalStartup()
{
this.ActivateEvent += new Microsoft.Office.Interop.Excel.DocEvents_ActivateEventHandler(this.Activate_Event);
}
private void Activate_Event()
{
Globals.ThisWorkbook.Application.SendKeys("%RPT{RETURN}", true);
}