Operation is not allowed

G

Geetha

I am a VSTO 2005 user. We are getting the following error, although not
consistently, while trying to add a new list object in Worksheet.ListObjects
collection:

listObject =
myWorksheet.Worksheet.ListObjects.Add(Excel.XlListObjectSourceType.xlSrcRange, position.TopLeftCell,
Type.Missing, Excel.XlYesNoGuess.xlYes, Type.Missing);

"The operation is not allowed. This operation is attempting to shift cells
in a list in your worksheet."


Please note that this list object previously existed in the ListObjects
collection, and was then deleted, and is now being re-added again. Since it
is not happening consistently, I am not able to understand what might be
causing this.
 

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