WindowResize Event

Applies To

Application object, Workbook object.

Description

Occurs when any workbook window is resized.

Syntax

Private Sub object_WindowResize(ByVal Wb As Excel.Workbook, ByVal Wn As Excel.Window)

object Application or Workbook.

Wb Used only with the Application object. The workbook displayed in the resized window.

Wn The resized window.

Example

This example runs when any workbook window is resized.

Private Sub Workbook_WindowResize(ByVal Wn As Excel.Window)
    Application.StatusBar = Wn.Caption & " resized"
End Sub