How to restore the VBA Editor to its intial settings ? I have some troubles with macro and projects explorer windows settings, after some bad manipulations.
12 Answers
The only way I know how to accomplish this is to edit the registry.
- Close All Office programs
- Open a command prompt and type
regedit
- Navigate to HKEY_CURRENTUSER\Software\Microsoft\VBA\6.0\Common
- Right click on
Common
and Export to save the *.reg file somewhere safe. This is your back up. Double clicking this file will restore your current settings. - Right click on
Common
and Delete it. Doing this will remove all of its subkeys that hold your personal settings.
The "Common" key will be recreated the next time you close the VBA Editor along with any changes to the settings you may make.

- 11,933
- 4
- 50
- 95
-
2The only key that matters under the `Common` is `Dock`. So only delete the **value** of `Dock` key would be enough. This also works for VBA\7.0 and maybe latter versions – LCFactorization Jun 25 '15 at 23:41
-
Because that wasn't the question @LCFactorization? The question was how to restore the default settings. I took that to mean *all* of them. – RubberDuck Jun 26 '15 at 00:00
-
@RubberDuck I've just installed your lovely add-in. If I close configure my vbe windows so I can see your duck-windows it all looks lovely but when I restart Excel it is back the way it was before: is there a way around this? – whytheq Feb 05 '16 at 18:55
-
Easy-peasy. Worked great. In my particular case, I made a Black Theme that I have to use sometimes and not others. I just saved the .REG file, then reset it and saved another one, then made a batch file to reread them. Clunky but it works. Only catch is in Office 2016 the key is HKEY_CURRENT_USER\Software\Microsoft\VBA\7.1\Common – Wade Hatler Jun 14 '18 at 23:40
I have the same issue, it's simple:
TOOLS OPTIONS DOCKING
Then select Object Browser, Project Explorer and that's all.

- 30,962
- 25
- 85
- 135

- 51
- 1
- 1
I had the same problem and realised that if I double click the blue heading of a minimal floating menu, such as the Project-VBAProject menu, it would resize and fit in with the other menus that are expanded. With a bit of moving around and double clicking the headers of the menus that I had selected from the VIEW option, I could get the screen back to the way it originally looked at the default setting of the VBA editor.
Phil

- 30,962
- 25
- 85
- 135

- 21
- 1
Solution Using a Mac and Excel 2016.
I found that I could drag the, e.g., project explorer (pe) window toward the edge of the vb window and the outline of the pe window moves and adjusts once you get close enough to the edge. This also works with the other windows as you bring them into view.
My default view is project explorer upper left, properties lower left. To return these to be in that order, drag the one to that location (which will fill that whole area) then drag the other one right on top of that one. That stacks them in the same column and then you can adjust their size within those locations.

- 11
- 4
I had this same issue and fought with it for literally 2 days. Finally figured it out!!! xD First close the Project Explorer and the Properties windows using the X at the top right. Then go to Options under the Docking tab. Uncheck all boxes. Close the options window and if desired check to see that everything is undocked. Now go back to Options>Docking and check all the boxes you had checked (default is all but object browser). Your windows should have returned to default.

- 11
- 2
I had all menus and windows missing, like no "File", no "Edit", no "View", etc.
Here's what I did:
- Closed Excel
- Opened the Registry Editor
- Navigated to
HKEY_CURRENTUSER\Software\Microsoft\VBA
- Right clicked on
VBA
and renamed toVBA_old
- Closed the Registry Editor
- Opened Excel
- Opened Visual Basic
…and voila, VBA was back to normal!
After that, I:
- Reopened the Registry Editor and saw that
VBA
had been recreated - Deleted
VBA_old

- 7,102
- 69
- 48
- 77

- 11
- 1
This may not solve the OPs original question of "default" for all, but in my case and possibly others I was looking to re-dock the "Project Explorer" and have modules pop up next to it like default. I'm not sure about other settings, but this is how I restored the above behavior.
In the project explorer right click and select "Dockable". Then insert a module and maximize it. This should restore what I consider default behavior.

- 2,271
- 1
- 33
- 57
Actually, it is very easy. You just have to go to View Tab then Click on the Project Explorer & Properties Window. It worked for me because I lost these two and now I got it by doing this. I hope so you will get the same result as well. View the image for more clarity.

- 51
- 8
Simple steps. Works for Mac , maybe windows too
Close all the tabs in the VBE
View --> Code . This will occupy entire space
After that ,view --> project explorer. this will pop up a tab, drag that tab to the top left corner. It auto fills into a small column which you can drag according to your preference .
Now select view --> properties window and drag the tab to bottom left.
Additional step ( if you use locals window )
- Select locals window from view and drag it to the bottom.

- 1
- 1
Right click any of the window you want to move and click "Dockable". This should allow you to move all the windows as you want and place them as you wish.

- 129
- 1
- 11
I'm not aware of a 'reset' command but the starting point would be to go to the View menu and start by setting the Code, Project Explorer and Properties windows and then the Toolbars>Standard (toolbar) perhaps?

- 1,956
- 2
- 12
- 13
-
Visual Studio provides 'Reset Window Layout' in the 'Window' menu, a very useful feature indeed. Why VBA cannot do the same is beyond me to understand - a single inadvertent keystroke or mouse-click can completely screw up the screen one is used to and result in hours lost trying to recover and get back to productivity. Makes me very angry. – Reinhard Neuwirth Sep 02 '17 at 14:33
I had an issue after typing vba code for 3 weeks and saving etc.Then for some reason I played with the sizing of the editor and my next file open showed "none of my code" like heart attack time, tried most of internet solutions including copying baked up files and recent ones and opened on another computer and the vba was there :). OK back to original puter still no code showing and then............... I saw at bottom left of editor 2 small icon buttons, procedure view and full module view ... bingo, pretty silly, I know, but for a while it scared the bejesus out of me.

- 1