Abort Option for the Excel Automated report generation


G

Guest

I am using Excel automation for a report.
Dim objExcel As New Excel.Application
objExcel.DisplayAlerts = False
Dim objWorkbooks As Excel.Workbooks = objExcel.Workbooks
Dim objWorkbook As Excel.Workbook
Dim objXLsheetUnits As Excel.Worksheet
objWorkbook = objWorkbooks.Open(strPath)
Then worksheets are populated with data from database and a macro is run as
objExcel.Run("Update_Workbook")
Process is killed forcefully on exit.

I want to add an Abort Option for the Run Report functionality.
If user clicks Run report and then Abort the report generation should stop
and
the process should be killed. But I can see the btnAbort.Click() is not
invoked
untill the report generation is completed.
Has anyone worked in Excel Automation implemented Abort Functionality?
 
Ad

Advertisements


Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top