George wrote:
Who know how to capture excel event for example 'Workbook_BeforeClose'
from other application for example MSWord. Using WithEvents in MSWord
class doesn't work, so I guess it impossible to do that.
Setting a reference (early binding) to Excel and then declaring:
Private WithEvents m_objExcel As Excel.Application
Gives me access to:
Private Sub m_objExcel_WorkbookBeforeClose(ByVal Wb _
As Excel.Workbook, Cancel As Boolean)
End Sub
So it does work, and is possible.
HTH
--
Rob
http://www.asta51.dsl.pipex.com/webcam/