Share via


ServerViewableItems.Add Method

Adds a reference to the ServerViewableItems collection.

Namespace:  Microsoft.Office.Interop.Excel
Assembly:  Microsoft.Office.Interop.Excel (in Microsoft.Office.Interop.Excel.dll)

Syntax

'Declaration
Function Add ( _
    Obj As Object _
) As Object
'Usage
Dim instance As ServerViewableItems
Dim Obj As Object
Dim returnValue As Object

returnValue = instance.Add(Obj)
Object Add(
    Object Obj
)

Parameters

  • Obj
    Type: System.Object

    Required ObjectObj can be a reference to sheets or named items (for example, named Ranges, charts, tables, and PivotTables). You cannot have both sheets and named items in the same collection.

Return Value

Type: System.Object
Object

Remarks

If you try to add a mix of both sheets and named items to the ServerViewableItems collection, an error is returned. The ServerViewableItems collection can contain references only to sheets, or references only to named items, but not both in the same call.

See Also

Reference

ServerViewableItems Interface

ServerViewableItems Members

Microsoft.Office.Interop.Excel Namespace