WorkbookBase.NewWindow Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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