How to Minimize and Maximize Code Windows - dummies

How to Minimize and Maximize Code Windows

By Michael Alexander

As you become proficient with VBA, you’ll spend lots of time working in code windows. Excel macros that you record are stored in a module, and you can type VBA code directly into a VBA module.

Code windows are much like workbook windows in Excel. You can minimize, maximize, resize, hide, and rearrange them, and more. Most people maximize the code window that they’re working on so that they can see more code and reduce distractions.

To maximize a code window, click the maximize button in its title bar (right next to the X) or double-click the title bar. To restore a code window to its original size, click the restore button (the icon that looks like a box) located next to the X.

Sometimes, you may want to have two or more code windows visible. For example, you may want to compare the code in two modules or copy code from one module to another. You can arrange the windows manually, or use the Window →Tile Horizontally or Window → Tile Vertically command to arrange them automatically.

You can quickly switch among code windows by pressing Ctrl+Tab. If you repeat that key combination, you keep cycling through all open code windows. Pressing Ctrl+Shift+Tab cycles through the windows in reverse order.

Minimizing a code window gets it out of the way. You can also click the close button (the X) in a code window’s title bar to close the window completely. (Closing a window just hides it; you won’t lose anything). To open it again, just double-click the appropriate object in the project window. Working with these code windows sounds more difficult than it really is.