Table of contents
TOC
Collapse the table of content
Expand the table of content

Window Object (VBA Add-In Object Model)

office 365 dev account|Last Updated: 6/12/2017
|
1 Contributor

Represents a window in the development environment. Remarks Use the Window object to show, hide, or position windows.

Important Objects, properties, and methods for controlling linked windows, linked window frames, and docked windows are included on the Macintosh for compatibility with code written in Windows. However, these language elements will generate run-time errors when run on the Macintosh.

You can use the Close method to close a window in the Windows collection. The Close method affects different types of windows as follows:

WindowResult of using Close method
Code windowRemoves the window from the Windows collection.
DesignerRemoves the window from the Windows collection.
Window objects of typelinked window frameWindows become unlinked separate windows.

Note Using the Close method with code windows and designers actually closes the window. Setting the Visible property to False hides the window but doesn't close the window. Using the Close method with development environment windows, such as theProject window orProperties window, is the same as setting the Visible property to False.

You can use the SetFocus method to move thefocus to a window. You can use the Visible property to return or set the visibility of a window. To find out what type of window you are working with, you can use the Type property. If you have more than one window of a type, for example, multiple designers, you can use the Caption property to determine the window you're working with. You can also find the window you want to work with using the DesignerWindow property of the VBComponent object or the Window property of the CodePane object.

© 2018 Microsoft