InvalidRangeException Class
The exception that is thrown when you try to add a control to a Microsoft Office Excel workbook at run time, but the specified range contains multiple areas instead of a contiguous block of cells.
Assembly: Microsoft.Office.Tools.v4.0.Framework (in Microsoft.Office.Tools.v4.0.Framework.dll)
System::Exception
Microsoft.VisualStudio.Tools.Applications.Runtime::RuntimeException
Microsoft.Office.Tools::InvalidRangeException
| Name | Description | |
|---|---|---|
![]() | InvalidRangeException() | This API supports the product infrastructure and is not intended to be used directly from your code. |
![]() | InvalidRangeException(Exception^) | This API supports the product infrastructure and is not intended to be used directly from your code. |
![]() | InvalidRangeException(String^) | This API supports the product infrastructure and is not intended to be used directly from your code. |
![]() | InvalidRangeException(String^, Exception^) | This API supports the product infrastructure and is not intended to be used directly from your code. |
| Name | Description | |
|---|---|---|
![]() | Equals(Object^) | (Inherited from Object.) |
![]() | GetBaseException() | (Inherited from Exception.) |
![]() | GetHashCode() | (Inherited from Object.) |
![]() | GetObjectData(SerializationInfo^, StreamingContext) | (Inherited from Exception.) |
![]() | GetType() | (Inherited from Exception.) |
![]() | ToString() | (Inherited from Exception.) |
You can add controls to Excel workbooks at run time by using the Office development tools in Visual Studio. For more information, see Adding Controls to Office Documents at Run Time.
Any public static ( Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

