none
Excel pops up a window while adding/ deleting a row saying "the operation you are about to perform affects a large number of cells and may take significant amount of time.Are you sure you want to continue?" RRS feed

  • General discussion

  •  My application automatically adds a row in a worksheet but only in one of the tab I am getting a pop up saying that "The operation you are about to perform affects large number of cells and may take significant amount of time.Are you sure you want to continue?" and also specifies a note saying "If no reponse is provided it will perform the action automatically" Since my row are getting added automatically we do not get this message on the application due to which it takes more than minute of time in order to add a row. Please let me know how can i get rid of this error so that my application runs smoothly. Any help will be appreciated. TIA.

    Please find attached error message snapshot

    Friday, August 24, 2012 4:46 AM

All replies

  • Since my row are getting added automatically we do not get this message

    There is an inconsistency, possibly a typo, in your post. It's not entirely clear whether A) this message box appears when you perform an action programmatically, and you do not want it to appear, or B) this message does not appear when when you perform an action programmatically, and you would like it to appear.

    If it's the former, there's no easy answer. I think the only way to dismiss it would be with the myExcelApp.SendKeys function. Of course, then you'd need to know when it was displayed. Usually when a dialog is up, an Office application will not respond to interop calls; you will get a RPC_SERVER_UNAVAILABLE type of error. You could try (perhaps from another thread of execution) trying to retrieve information from the application object, and if you get such an error, assume the dialog is up. You would need to do a lot of testing. Alternatively, and probably preferably, you could try to reduce the size of your operations. Is this problem occurring when you're adding a single row? If not, perhaps try adding rows one by one.

    If it's the latter, you could create your own form/dialog/message box.

    Saturday, August 25, 2012 11:49 AM
  • This message box appears when I try to manually insert a row. So I think this would be appearing in automated insertion of rows too where in this would be taking around 30 sec to insert a row.

    Workaround which helped solving this issue was to create a copy of the sheet and remove the original one which helped in getting rid of this dialog box and we were able to insert row in just sec. But it would still be great to know what caused this dialog box to pop up. One more thing i would like to inform you is that this dialog box appears for just a single sheet in whole workbook.

    Monday, August 27, 2012 3:59 AM
  • I can't imagine why it might only be happening on a certain worksheet, unless, of course, there's a really huge amount of data there.

    Since this isn't a VSTO problem, you'd be better asking in the Excel for Developers forum.

    Monday, August 27, 2012 10:09 AM