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:

Fig 1, Tools, Options, Docking tab for the VBE.
Suppose your window looks like this:

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

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. Download the movies:
Docking the project explorer 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
All comments about this page:
Comment by: Redman (10/29/2009 6:29:21 PM)Fantastic page. Lost so much time trying to find the answer to this question. Thanks so much for sharing this with the world. : )
Comment by: AK (11/3/2009 6:06:20 AM)Hi
I undocked and then redocked my properties and project explorer window, now the code window seems to not resize automatically to size according to the window.. that is it still occupies the entire space, and the Project explorer /Properties window floats above the code window.. how can I get it back to normal
Comment by: Jan Karel Pieterse (11/3/2009 2:10:10 PM)Hi AK,
What happens if you doubleclick the titlebar of the code window?
Alternatively, you could select Window, Cascade to have all code windows fit in the blank area next to the project explorer.
Comment by: AK (11/5/2009 10:49:29 PM)Hi Jan,
I got it back to normal by dragging the project explorer to the extreme left of the screen, though now , the properties window doesn't dock with the project explorer and ditto for the immediate window. I even reinstalled MS office but it doesn't work. My company settings do not allow me to do a RegEdit.. there has got to be a simple way of doing this
Comment by: Jan Karel Pieterse (11/5/2009 11:18:46 PM)Hi AK,
Are their dock settings checked?
Comment by: Tony (11/24/2009 7:22:01 PM)Thank you! This drove me crazy until I found your page.
Comment by: Bjorn Brechan (2/23/2010 5:40:23 AM)No matter what I do of the above suggestions, the Project explorer window and the properties window will only dock horizontally at the bottom or top. And yes, it seems like a very silly question - but it is anoying not to have an overview like one used to have....
Please help!
Regards
Bjorn
Comment by: Jan Karel Pieterse (2/23/2010 8:36:39 AM)Hi Bjorn,
Doesn't the video help?
Have a question, comment or suggestion? Then please use this form.