Share via


InvalidRangeException Class (2007 System)

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.

Namespace:  Microsoft.Office.Tools
Assembly:  Microsoft.Office.Tools.Common.v9.0 (in Microsoft.Office.Tools.Common.v9.0.dll)

Syntax

'Declaration
<SerializableAttribute> _
Public NotInheritable Class InvalidRangeException _
    Inherits RuntimeException
'Usage
Dim instance As InvalidRangeException
[SerializableAttribute]
public sealed class InvalidRangeException : RuntimeException
[SerializableAttribute]
public ref class InvalidRangeException sealed : public RuntimeException
public final class InvalidRangeException extends RuntimeException

Remarks

You can add controls to Excel workbooks at run time by using Visual Studio Tools for Office solutions. For more information, see Adding Controls to Office Documents at Run Time.

Inheritance Hierarchy

System.Object
  System.Exception
    Microsoft.VisualStudio.Tools.Applications.Runtime.RuntimeException
      Microsoft.Office.Tools.InvalidRangeException

Thread Safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

See Also

Reference

InvalidRangeException Members

Microsoft.Office.Tools Namespace

Other Resources

Adding Controls to Office Documents at Run Time