次の方法で共有


WorkbookBase.NewWindow Method

Definition

Creates a new window.

public:
 Microsoft::Office::Interop::Excel::Window ^ NewWindow();
public Microsoft.Office.Interop.Excel.Window NewWindow ();
member this.NewWindow : unit -> Microsoft.Office.Interop.Excel.Window
Public Function NewWindow () As Window

Returns

Examples

The following code example uses the NewWindow method to create a new Excel application window that has the caption "This is a new window" and does not have gridlines.

This example is for a document-level customization.

private void WorkbookNewWindow()
{
    Excel.Window newWindow = this.NewWindow();
    newWindow.Caption = "This is a new Window";
    newWindow.DisplayGridlines = false;
}
Private Sub WorkbookNewWindow()
    Dim newWindow As Excel.Window = Me.NewWindow()
    newWindow.Caption = "This is a new Window"
    newWindow.DisplayGridlines = False
End Sub

Applies to