Share via


WindowActivate Event [Publisher 2003 VBA Language Reference]

Occurs when the application window is activated.

Private Subobject**_WindowActivate**(ByVal Wn As Window)

object A variable which references an object of type Application declared with events in a class module.

Wn Required. The window that's being activated.

Remarks

For information about using events with the Application object, see Using Events with the Application Object .

Example

This example maximizes the Microsoft Publisher window when it's activated. This code must be placed in a class module, and an instance of the class must be correctly initialized in order to see this example work; see Using Events with the Application Object for directions on how to accomplish this.

Public WithEvents appPublisher as Publisher.Application

Private Sub appPublisher_WindowActivate _
        (ByVal Wn As Window)
    Wn.WindowState = pbWindowStateMaximize
End Sub

Applies to | Application Object