Reference: Q0046
Article Last Modified on 15-Feb-2008
I would like to delete some worksheets in a macro function, but I would like to
do so without having the message boxes. It should be the equivalent of the VBA:
Application.DisplayAlerts = False.
To switch off alerts, use the following:
static int xlcError = 84; int rc = CXllApp::Excel(xlcError, 1, &CXlOper(FALSE));
To switch alerts back on again:
static int xlcError = 84; int rc = CXllApp::Excel(xlcError, 1, &CXlOper(TRUE));