Name

window.EnableResize [= setting]

Synopsis

True allows the user to resize the window; False prohibits resizing. Default is True. Accessing this property causes an error if WindowState is not xlNormal. The following code prevents the user from changing the active window’s size:

Sub TestDisableResize(  )
    If ActiveWindow.WindowState = xlNormal Then _
        ActiveWindow.EnableResize = False
End Sub

Get Programming Excel with VBA and .NET now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.