Hi,
I am writing an XLA in XL2002 which will act on a number of legacy and new spreadsheets. During the execution of the XLA I set cell values.
i.e. m_rRange.Cells(j, i).Value = m_sInVal(j, matchIndex)
This then triggers the onChange event of the worksheet. Unfortunately, for one of the spreadsheets that this needs to work with, this causes an error. The error is trapped within the spreadsheet itself but the sub End is called which halts all VBA code execution.
My problem is that the XLA has not finished working and gets terminated early. I cannot capture this using an onError statement as it is never triggered (the spreadsheet code stops the execution and control never returns to the XLA).
I can disable the events using Application.EnableEvents but this means that none of the onChange events are called which is also not desirable.
So my question is: is there any way of disabling the termination of code using the End() statement, or of detecting when it happens to stop it?
Thanks for the help,
Ant
I am writing an XLA in XL2002 which will act on a number of legacy and new spreadsheets. During the execution of the XLA I set cell values.
i.e. m_rRange.Cells(j, i).Value = m_sInVal(j, matchIndex)
This then triggers the onChange event of the worksheet. Unfortunately, for one of the spreadsheets that this needs to work with, this causes an error. The error is trapped within the spreadsheet itself but the sub End is called which halts all VBA code execution.
My problem is that the XLA has not finished working and gets terminated early. I cannot capture this using an onError statement as it is never triggered (the spreadsheet code stops the execution and control never returns to the XLA).
I can disable the events using Application.EnableEvents but this means that none of the onChange events are called which is also not desirable.
So my question is: is there any way of disabling the termination of code using the End() statement, or of detecting when it happens to stop it?
Thanks for the help,
Ant