Kommentar
Åtkomst till den här sidan kräver auktorisering. Du kan prova att logga in eller ändra kataloger.
Åtkomst till den här sidan kräver auktorisering. Du kan prova att ändra kataloger.
Gets a CustomViews collection that represents all the custom views for the workbook.
Namespace: Microsoft.Office.Tools.Excel
Assembly: Microsoft.Office.Tools.Excel.v9.0 (in Microsoft.Office.Tools.Excel.v9.0.dll)
Syntax
'Declaration
<BrowsableAttribute(False)> _
Public ReadOnly Property CustomViews As CustomViews
'Usage
Dim instance As Workbook
Dim value As CustomViews
value = instance.CustomViews
[BrowsableAttribute(false)]
public CustomViews CustomViews { get; }
[BrowsableAttribute(false)]
public:
property CustomViews^ CustomViews {
CustomViews^ get ();
}
public function get CustomViews () : CustomViews
Property Value
Type: CustomViews
A CustomViews collection that represents all the custom views for the workbook.
Examples
The following code example uses the CustomViews property to add a custom view named "Summary" to the current workbook, and then programmatically displays the Custom Views dialog to demonstrate that the new custom view was created.
This example is for a document-level customization.
Private Sub AddCustomView()
Me.CustomViews.Add("Summary", True, True)
Me.Application.Dialogs( _
Excel.XlBuiltInDialog.xlDialogCustomViews).Show()
End Sub
private void AddCustomView()
{
this.CustomViews.Add("Summary", true, true);
this.Application.Dialogs[Excel.XlBuiltInDialog.xlDialogCustomViews].Show(
missing, missing, missing, missing, missing, missing, missing, missing,
missing, missing, missing, missing, missing, missing, missing, missing,
missing, missing, missing, missing, missing, missing, missing, missing,
missing, missing, missing, missing, missing, missing);
}
.NET Framework Security
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.