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.
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.
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.
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.
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.
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?
来源:https://stackoverflow.com/questions/26810053/how-to-restore-vba-editor-to-its-initial-settings