title | keywords | f1_keywords | api_name | ms.assetid | ms.date | ms.localizationpriority | ||
---|---|---|---|---|---|---|---|---|
Window.WindowNumber property (Excel) |
vbaxl10.chm356124 |
|
|
42dc6fa2-8c10-41d8-2f74-95401e154094 |
05/21/2019 |
medium |
Returns the window number. For example, a window named Book1.xls:2 has 2 as its window number. Most windows have the window number 1. Read-only Long.
expression.WindowNumber
expression A variable that represents a Window object.
The window number isn't the same as the window index (the return value of the Index property), which is the position of the window within the Windows collection.
This example creates a new window of the active window and then displays the window number of the new window.
ActiveWindow.NewWindow
MsgBox ActiveWindow.WindowNumber
[!includeSupport and feedback]