Partilhar via


Troubleshooting Exceptions: Microsoft.Office.Tools.CannotRemoveControlException 

A CannotRemoveControlException exception is thrown when an attempt is made to programmatically remove a control that was not added programmatically.

Associated Tips

  • You can only remove a control programmatically if it was added programmatically.

    • You can only remove a control programmatically if it was added programmatically. If the control was added to the document at design time instead of at run time, it cannot be removed.

See Also

Tasks

How to: Find Out More About an Exception with the Exception Assistant

Reference

CannotRemoveControlException