Hi all,
I am trying to automate excel. And creating excel object as
And trying to close/kill(KillCode:oExcel = CreateObject("Excel.Application")) the Excel in Process window using
But the P.MainWindowHandle.ToInt32 is always 0Code:For Each P as Process In Process.GetProcessByName("Excel") if p.MainWindowHandle.ToInt32 == oExcel ) p.kill end if Next
I have tried this one , Which works for simple methods and not for complex methods




) the Excel in Process window using
Reply With Quote