Fixing Docking Of Windows In The VBE

If you're a VBA programmer like me, you're probably picky about your window arrangements in the Visual Basic Editor. Sometimes it messes things up and it can be a challenge to get those windows where you want them.

First of all, you have to choose whether or not you want them to dock at all. Tools, options, Docking enables you to set that for each window separately:
Tools, Options, Docking tab for the VBE
Fig 1, Tools, Options, Docking tab for the VBE.

Suppose your window looks like this:
VBE window. Project explorer above Properties window
Fig 2, VBE window. Project explorer above Properties window.

and you want it to look like this:
VBE window. Project explorer below Properties window
Fig 3, VBE window. Project explorer below Properties window.

What do you do?

  • Double click the title bar of the project explorer (it will become a floating window)
  • Drag the center of the window back to the area where the Properties window is.
  • Keep moving until the thickness of the window border changes to a thin line
  • Now move downwards until you're almost at the bottom of the VBE window. The shape of the window should change.
  • Let go.

Since a picture says more than a 1000 words and a movie is worth a 1000 pictures, I've recorded my movements while doing these things. Move your mouse (or tap) on the two GIF's below to see them animate

Here is how you dock the VBA project explorer where you want it
Docking the project explorer window

Here is how you dock the VBA project explorer where you want it
Docking the watch window

Sometimes, one of the windows disappears completely. This may be caused by a change in screen resolution, but I've heard of inexplicable disappearances too. To fix that, follow these steps:

  • Open the VBE and select Tools, Options
  • Select the Docking tab and make sure the window in question has no checkmark in that tab
  • Close the options window and select Window, Cascade.
  • Now open the Options dialog again and check the docking property of the window you just (hopefully) got back.
  • Drag it to where you want it docked.

Comments

Showing last 8 comments of 129 in total (Show All Comments):

 


Comment by: Jan Karel Pieterse (25-3-2022 11:57:00) deeplink to this comment

Hi Nate,

Yes, but how precisely depends on whether you want them side-by side in the vertical pane or at the bottom or top in a horizontal fashion. Pay attention to the shape of the "window" you see while you're dragging it, it tries to tell you how it will drop.


Comment by: PAUL H HOSSLER (3-6-2022 15:13:00) deeplink to this comment

In the editor, I used to have the Watch and/or Immediate windows docked and shown as 'Tiles' so that they were at the bottom of the screen and not floating over the module window.

Now when I open them with docked = checked, they still float.

How can I get them to tile at the bottom like they used to?

Thanks


Comment by: PAUL H HOSSLER (3-6-2022 15:23:00) deeplink to this comment

Update if you're interested

Deleted this

HKEY_CURRENT_USER\SOFTWARE\Microsoft\VBA\7.1\Common\Dock

from the registry, opened an Office app, and the watch and immediate windows are now tiles and back where they belong (or at least where I like them)


Comment by: Jan Karel Pieterse (3-6-2022 19:50:00) deeplink to this comment

Hi Paul,

I was going to suggest something like that. Glad you got it sorted


Comment by: Alvaro Frederico Ramos Pompeia (15-3-2023 17:31:00) deeplink to this comment

Excel project, properties, immediate windows are docked. The code of all userforms are floating and over the project and properties. Selecting maximized on a form it occupies all screen and vbe stay behind it.
(Sorry, English is not my native language).


Comment by: Jan Karel Pieterse (15-3-2023 17:43:00) deeplink to this comment

Hi Ramos,

Try what is described in this comment by Paul:
https://jkp-ads.com/articles/VBEDocking.asp?AllComments=True#31825


Comment by: dave (20-3-2023 23:44:00) deeplink to this comment

thank you so much this was spot on and saved me from going nuts!


Comment by: Jan Karel Pieterse (21-3-2023 11:31:00) deeplink to this comment

Hi Dave,

You're welcome!


Have a question, comment or suggestion? Then please use this form.

If your question is not directly related to this web page, but rather a more general "How do I do this" Excel question, then I advise you to ask your question here: www.eileenslounge.com.




To post VBA code in your comment, use [VB] tags, like this: [VB]Code goes here[/VB].