VBA Editor Window(s) size challenge

E

EagleOne

2003/2007


For years, I have been able to have four stable (size) windows open in the VBA Editor.


Project Explorer Code Window



Properties Immediate Window


Unless I am crazy, all four of those windows were fixed size. Meaning that no matter what module of
the project was double-clicked, the code window would change to the newly selected module-code
and all four windows were distinct (no windows overlapped any other).

Recently, I found that my Immediate Window overlaps the bottom of my Code Window which screws up
what I can scroll-to in the Code Window.

Certainly, I screwed something up. I have tried many ways to resize the Windows and "Docking"
on/off selections but I can not find my "good old" four stable windows.

Any suggestions greatly appreciated!

EagleOne
 
E

EagleOne

More specific,

Previously, If I closed the Immediate Window the Code Window would resize. Re establishing the IW,
would in turn, resize that Code Window.

Maybe I only thought I was in Heaven.
 
D

Dave Peterson

When I screw up the layout (including the tiling), I'll just follow these
instructions from Tom Ogilvy:

What version of excel? If Version 2002 or 2003 look for

HKEY_CURRENT_USER\Software\Microsoft\VBA\6.0\Common\Dock

you aren't deleting a file. You are deleting a value in the registry.
Windows/Excel will recreate it with default values which should restore the
original layout of the VBE.
 
E

EagleOne

Hello Dave,

I saw your comment using Google Search to a prior post to someone else.

My immediate version is 2007. Even still, I found that registry entry and deleted same.

Is it necessary to re-boot the o/s and/or just re-initiate Excel?

Do you have easy access to Tom's link?

My concern is whether the delete is just to "Dock" key
or to "Common." I deleteted just the "Dock" key and that did not bring me back the the "Ole"
windows..

EagleOne
 
D

Dave Peterson

I saved the contents of Tom's post. You could use google groups to search for
it if you want.

And you delete the Dock key--not the entire Comman branch.

It's the same key for xl2007--I just tried it and it worked fine for me.

And did you have excel closed when you did this?
 
E

EagleOne

For future reference to others with this issue: (I was using 2007)


1) In VBE Editor (Alt + F11) position the windows you wish "docked" first.
(Note that the Code window is not Dockable) - so bring it up after #2 next.

2) Resize your Immediate Window AFTER it is docked. (My case bottom right)

3) Bring up your last window (Code window in my case - Upper Right) and maximize it.

4) Now all four windows are EFFECTIVELY Docked and all scroll and slide bars should be visible and
usable in all four boxes

5) As Dave mentioned:
In RegEdit: (backup your Registry first!)
Find: HKEY_CURRENT_USER\Software\Microsoft\VBA\6.0\Common\Dock
Delete it.
Close RegEdit

6) Save your file using the Save button in the VBE Editor

7) DO NOT CLOSE the VBE editor yet; BUT DO close Excel (Which will also close the VBE window)
(If not above sequence, Excel will error as it closes close voiding the changes to VBE windows.)

HTH
 
D

Dave Peterson

Deleting the key will delete any changes you've made to the layout of the VBE.

So you're effectively rearranging deck chairs on the titanic.

Just make sure excel is closed when you delete the key from the registry.
 
E

EagleOne

No (Da!) I did not have Excel closed. Thus the error - unless I closed Excel without closing the
VBE 1st.
 
E

EagleOne

I'll revise my steps:

1) Close Excel

2) As Dave mentioned:
In RegEdit: (backup your Registry first!) (For Excel 2000, 2003, 2007)
Find: HKEY_CURRENT_USER\Software\Microsoft\VBA\6.0\Common\Dock
Delete it.
Close RegEdit

3) Open Excel

4) In VBE Editor (Alt + F11) position the windows you wish "docked" first.
(Note that the Code window is not Dockable) - so bring it up after #5 next.

5) Resize your Immediate Window AFTER it is docked. (My case bottom right)

6) Bring up your last window (Code window in my case - Upper Right) and maximize it.

7) Now all four windows are EFFECTIVELY Docked and all scroll and slide bars should be visible and
usable in all four boxes

8) Save your file using the Save button in the VBE Editor


Thanks Dave!
 
D

Dave Peterson

That sounds much better.

I'll revise my steps:

1) Close Excel

2) As Dave mentioned:
In RegEdit: (backup your Registry first!) (For Excel 2000, 2003, 2007)
Find: HKEY_CURRENT_USER\Software\Microsoft\VBA\6.0\Common\Dock
Delete it.
Close RegEdit

3) Open Excel

4) In VBE Editor (Alt + F11) position the windows you wish "docked" first.
(Note that the Code window is not Dockable) - so bring it up after #5 next.

5) Resize your Immediate Window AFTER it is docked. (My case bottom right)

6) Bring up your last window (Code window in my case - Upper Right) and maximize it.

7) Now all four windows are EFFECTIVELY Docked and all scroll and slide bars should be visible and
usable in all four boxes

8) Save your file using the Save button in the VBE Editor

Thanks Dave!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top