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?

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:


Comments

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

 


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!


Comment by: Leandra Tel (3-8-2023 23:32:00) deeplink to this comment

I think this solution would solve my problem with the VBE docking. But, I am not a programmer or IT wizard. Therefore, my question: where and how can I apply this (comment by Paul 3-6-2022 15:23):
https://jkp-ads.com/articles/VBEDocking.asp?AllComments=True#31825


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

Hi Leandra,

First, close all Office apps.

You can access the registry editor by clicking the Windows find box and typing regedit and pressing Enter. Then you can paste this

Computer\HKEY_CURRENT_USER\SOFTWARE\Microsoft\VBA\7.1\Common

into its address bar. Hit Enter to get you there. On the right-hand side, find an entry called Dock. Right-click it and choose Delete. This can be done safely as the VBE recreates that key when it opens.


Comment by: Leandra Tel (8-8-2023 23:41:00) deeplink to this comment

Hi Jan,

Thanks for the instruction to enter the registry editor. I was able to find and delete that entry. Unfortunately, the result wasn't what I hoped for. The windows in VBE don't dock nicely but are all separate, and when I add a new window, I must rearrange them manually. It was worth a try to solve it. I will have to get used to it, I guess.
Best, Leandra


Comment by: Jan Karel Pieterse (9-8-2023 09:24:00) deeplink to this comment

Hi Leandra,

What settings are checked in the VBE's Tools, Options, Dock tab? Mine has all but the last one checked.


Comment by: Norman Mahan (31-3-2024 22:57:00) deeplink to this comment

All of my VBA editor windows are undocked and I can't get any of them to do so. The proper boxes in Tools are checked. I've tried these instructions for over an hour and no luck. I'm running the latest version of Excel (Version 2404 Build 17521.200000 Click-to-run). Any thoughts?


Comment by: Jan Karel Pieterse (2-4-2024 10:20:00) deeplink to this comment

Hi Norman,

Have you tried this:
https://jkp-ads.com/articles/vbedocking.asp?AllComments=True#31825


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].