Is there a macro or event I can trigger off when Excel gets focus from another application?开发者_如何学Go
My Excel workbook interacts with another application via COM. The user selects an item in a tree control in the other application and when they return to the Excel workbook, I want to update some controls with the values of the items selected in the other application.
I can get the data OK (and I do it on startup of the Workbook via Auto_Open) and populate the Excel controls. My problem is that I can't figure out the macro or event that gets triggered when the Excel Application gets focus back. (If there is one)
TIA, Paolo
Subclassing may be the best way to go.
This post on the Mr Excel Forum may give you the information you need to get it working (see post number 6 by Jaafar Tribak).
精彩评论